Update to portaudio revision 1851.

Mostly from Holger Mikolon <holger at mikolon dot com>

ok sthen@
This commit is contained in:
brad 2013-03-12 00:59:50 +00:00
parent 777ea41783
commit 93ef35d481
11 changed files with 91 additions and 74 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.13 2013/03/10 22:55:05 espie Exp $
# $OpenBSD: Makefile,v 1.14 2013/03/12 00:59:50 brad Exp $
COMMENT= portable cross-platform audio API
DISTNAME= portaudio-svn-1406
REVISION= 4
DISTNAME= portaudio-svn-1851
CATEGORIES= audio
MASTER_SITES= http://comstyle.com/source/
EXTRACT_SUFX= .tar.xz
SHARED_LIBS= portaudio 1.0
@ -13,13 +14,11 @@ HOMEPAGE= http://www.portaudio.com/
# MIT
PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c m pthread sndio
MASTER_SITES= http://jakemsr.trancell.org/distfiles/
WANTLIB= m pthread sndio
USE_GMAKE= Yes
USE_LIBTOOL= Yes
AUTOCONF_VERSION= 2.61
AUTOCONF_VERSION= 2.68
CONFIGURE_STYLE= autoconf no-autoheader
CONFIGURE_ARGS= --without-alsa --without-oss --without-jack

View File

@ -1,5 +1,2 @@
MD5 (portaudio-svn-1406.tar.gz) = RlHa1Y+Gn5EgX5e3aMqyTw==
RMD160 (portaudio-svn-1406.tar.gz) = XulIpuTPeK87JCDgXcimf4E2BFo=
SHA1 (portaudio-svn-1406.tar.gz) = fIvJxOhzOJ1qs4hdYBkWYniLhlg=
SHA256 (portaudio-svn-1406.tar.gz) = DT3QREhDCriP1SAK13kb9EH5z5rkNf1XI4LCtuF3UrU=
SIZE (portaudio-svn-1406.tar.gz) = 1132199
SHA256 (portaudio-svn-1851.tar.xz) = d+EgTWDkSj5Pnz9LDmy84lCICOdAb2FHbaaC2hSq3qI=
SIZE (portaudio-svn-1851.tar.xz) = 885008

View File

@ -372,7 +372,7 @@ OpenStream(struct PaUtilHostApiRepresentation *hostApi,
}
s->base.streamInfo.inputLatency = 0;
s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
(double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatency(&s->bufproc)) / (double)par.rate : 0;
(double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
s->base.streamInfo.sampleRate = par.rate;
s->active = 0;
s->stopped = 1;

View File

@ -1,18 +1,19 @@
--- Makefile.in.orig Tue Feb 26 02:37:48 2008
+++ Makefile.in Sun Jan 18 10:09:36 2009
@@ -120,6 +120,7 @@ LTOBJS := $(OBJS:.o=.lo)
SRC_DIRS = \
src/common \
src/hostapi/alsa \
$OpenBSD: patch-Makefile_in,v 1.4 2013/03/12 00:59:50 brad Exp $
--- Makefile.in.orig Thu Jul 5 23:44:34 2012
+++ Makefile.in Thu Jul 5 23:49:34 2012
@@ -146,6 +146,7 @@ SRC_DIRS = \
src/hostapi/dsound \
src/hostapi/jack \
src/hostapi/oss \
+ src/hostapi/sndio \
src/hostapi/asihpi \
src/hostapi/asio \
src/hostapi/coreaudio \
@@ -136,7 +137,7 @@ SRC_DIRS = \
src/hostapi/wasapi \
src/hostapi/wdmks \
src/hostapi/wmme \
@@ -155,7 +156,7 @@ SRC_DIRS = \
SUBDIRS =
@ENABLE_CXX_TRUE@SUBDIRS += bindings/cpp
-all: lib/$(PALIB) all-recursive tests
-all: lib/$(PALIB) all-recursive tests examples selftests
+all: lib/$(PALIB) all-recursive
tests: bin-stamp $(TESTS)

View File

@ -1,36 +1,47 @@
$OpenBSD: patch-configure_in,v 1.2 2012/08/22 20:14:06 naddy Exp $
--- configure.in.orig Thu May 22 10:47:36 2008
+++ configure.in Mon Aug 20 17:50:01 2012
@@ -17,6 +17,10 @@ AC_ARG_WITH(alsa,
[ --with-alsa (default=yes)],
with_alsa=$withval, with_alsa="yes")
$OpenBSD: patch-configure_in,v 1.3 2013/03/12 00:59:50 brad Exp $
--- configure.in.orig Sat Jul 7 16:28:11 2012
+++ configure.in Fri Mar 8 22:53:01 2013
@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
[with_alsa=$withval])
+AC_ARG_WITH(sndio,
+ [ --with-sndio (default=yes)],
+ with_sndio=$withval, with_sndio="yes")
+AC_ARG_WITH(sndio,
+ AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
+ [with_sndio=$withval])
+
AC_ARG_WITH(jack,
[ --with-jack (default=yes)],
with_jack=$withval, with_jack="yes")
@@ -88,6 +92,7 @@ dnl checks for various host APIs and arguments to conf
dnl turn them on or off
AC_ARG_WITH(jack,
AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
[with_jack=$withval])
@@ -120,6 +124,10 @@ have_alsa=no
if test "x$with_alsa" != "xno"; then
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
fi
+have_sndio=no
+if test "x$with_sndio" != "xno"; then
+ AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
+fi
have_asihpi=no
if test "x$with_asihpi" != "xno"; then
AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
@@ -351,6 +359,13 @@ case "${host_os}" in
AC_DEFINE(PA_USE_ALSA,1)
fi
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
+AC_CHECK_LIB(sndio, sio_initpar, have_sndio=yes, have_sndio=no)
AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
@@ -303,6 +308,13 @@ case "${host_os}" in
LIBS="$LIBS -lasound"
OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
AC_DEFINE(PA_USE_ALSA)
+ fi
+
+ if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
+ DLL_LIBS="$DLL_LIBS -lsndio"
+ LIBS="$LIBS -lsndio"
+ OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
+ AC_DEFINE(PA_USE_SNDIO)
fi
if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then
+ AC_DEFINE(PA_USE_SNDIO,1)
+ fi
+
if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
DLL_LIBS="$DLL_LIBS $JACK_LIBS"
CFLAGS="$CFLAGS $JACK_CFLAGS"
@@ -454,6 +469,7 @@ case "$target_os" in
;;
*)
AC_MSG_RESULT([
+ Sndio ....................... $have_sndio
OSS ......................... $have_oss
JACK ........................ $have_jack
])

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-include_portaudio_h,v 1.1 2009/03/14 02:31:40 jakemsr Exp $
--- include/portaudio.h.orig Mon Feb 25 17:37:40 2008
+++ include/portaudio.h Sun Mar 8 21:55:43 2009
$OpenBSD: patch-include_portaudio_h,v 1.2 2013/03/12 00:59:50 brad Exp $
--- include/portaudio.h.orig Thu Jul 5 23:44:38 2012
+++ include/portaudio.h Thu Jul 5 23:49:33 2012
@@ -236,7 +236,8 @@ typedef enum PaHostApiTypeId
paWDMKS=11,
paJACK=12,

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-portaudio-2_0_pc_in,v 1.1 2013/03/12 00:59:50 brad Exp $
--- portaudio-2.0.pc.in.orig Sun Sep 2 22:02:42 2012
+++ portaudio-2.0.pc.in Sun Sep 2 22:05:07 2012
@@ -8,5 +8,6 @@ Description: Portable audio I/O
Requires:
Version: 19
-Libs: -L${libdir} -lportaudio @LIBS@
-Cflags: -I${includedir} @THREAD_CFLAGS@
+Libs: -L${libdir} -lportaudio
+Libs.private: @LIBS@
+Cflags: -I${includedir}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.1 2009/03/14 02:31:40 jakemsr Exp $
--- src/os/unix/pa_unix_hostapis.c.orig Thu May 22 01:47:01 2008
+++ src/os/unix/pa_unix_hostapis.c Sun Mar 8 22:53:55 2009
$OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.2 2013/03/12 00:59:50 brad Exp $
--- src/os/unix/pa_unix_hostapis.c.orig Thu Jul 5 23:44:45 2012
+++ src/os/unix/pa_unix_hostapis.c Thu Jul 5 23:49:33 2012
@@ -44,6 +44,7 @@
PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
@ -9,15 +9,14 @@ $OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.1 2009/03/14 02:31:40 jakemsr
PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
/* Added for IRIX, Pieter, oct 2, 2003: */
PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
@@ -79,6 +80,11 @@ PaUtilHostApiInitializer *paHostApiInitializers[] =
@@ -78,6 +79,10 @@ PaUtilHostApiInitializer *paHostApiInitializers[] =
#endif
#endif /* __linux__ */
+
+
+#ifdef PA_USE_SNDIO
+ PaSndio_Initialize,
+ PaSndio_Initialize,
+#endif
#ifdef PA_USE_JACK
#if PA_USE_JACK
PaJack_Initialize,

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_os_unix_pa_unix_util_c,v 1.1 2012/05/19 06:04:22 ajacoutot Exp $
--- src/os/unix/pa_unix_util.c.orig Wed May 16 20:58:26 2012
+++ src/os/unix/pa_unix_util.c Wed May 16 21:06:25 2012
@@ -218,6 +218,7 @@ static PaError BoostPriority( PaUnixThread* self )
$OpenBSD: patch-src_os_unix_pa_unix_util_c,v 1.2 2013/03/12 00:59:50 brad Exp $
--- src/os/unix/pa_unix_util.c.orig Thu Jul 5 23:44:45 2012
+++ src/os/unix/pa_unix_util.c Thu Jul 5 23:49:33 2012
@@ -251,6 +251,7 @@ static PaError BoostPriority( PaUnixThread* self )
assert( self );
@ -9,7 +9,7 @@ $OpenBSD: patch-src_os_unix_pa_unix_util_c,v 1.1 2012/05/19 06:04:22 ajacoutot E
if( pthread_setschedparam( self->thread, SCHED_FIFO, &spm ) != 0 )
{
PA_UNLESS( errno == EPERM, paInternalError ); /* Lack permission to raise priority */
@@ -228,6 +229,7 @@ static PaError BoostPriority( PaUnixThread* self )
@@ -261,6 +262,7 @@ static PaError BoostPriority( PaUnixThread* self )
{
result = 1; /* Success */
}
@ -17,7 +17,7 @@ $OpenBSD: patch-src_os_unix_pa_unix_util_c,v 1.1 2012/05/19 06:04:22 ajacoutot E
error:
return result;
}
@@ -266,8 +268,10 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (*
@@ -299,8 +301,10 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (*
#endif
PA_UNLESS( !pthread_attr_init( &attr ), paInternalError );
@ -28,7 +28,7 @@ $OpenBSD: patch-src_os_unix_pa_unix_util_c,v 1.1 2012/05/19 06:04:22 ajacoutot E
PA_UNLESS( !pthread_create( &self->thread, &attr, threadFunc, threadArg ), paInternalError );
started = 1;
@@ -314,7 +318,9 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (*
@@ -347,7 +351,9 @@ PaError PaUnixThread_New( PaUnixThread* self, void* (*
{
int policy;
struct sched_param spm;

View File

@ -1,2 +0,0 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
@lib lib/libportaudio.so.${LIBportaudio_VERSION}

View File

@ -1,7 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
@comment $OpenBSD: PLIST,v 1.2 2013/03/12 00:59:50 brad Exp $
include/portaudio.h
%%SHARED%%
lib/libportaudio.a
lib/libportaudio.la
@lib lib/libportaudio.so.${LIBportaudio_VERSION}
lib/pkgconfig/
lib/pkgconfig/portaudio-2.0.pc