pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/portaudio Initial import of portaudio-18.1, a po...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d16d317e00c0
branches:  trunk
changeset: 473532:d16d317e00c0
user:      ben <ben%pkgsrc.org@localhost>
date:      Tue Apr 20 17:52:48 2004 +0000

description:
Initial import of portaudio-18.1, a portable cross-platform audio API.

Package provided by dotz%irc.pl@localhost.

PortAudio is a free, cross platform, open-source, audio I/O library.  It
lets you write simple audio programs in 'C' that will compile and run on
many platforms including Windows, Macintosh (8,9,X), Unix (OSS), SGI, and
BeOS. PortAudio is intended to promote the exchange of audio synthesis
software between developers on different platforms, and was recently
selected as the audio component of a larger PortMusic project that includes
MIDI and sound file support.

PortAudio provides a very simple API for recording and/or playing sound
using a simple callback function.  Example programs are included that
synthesize sine waves and pink noise, perform fuzz distortion on a guitar,
list available audio devices, etc.

diffstat:

 audio/portaudio/DESCR            |  12 ++++
 audio/portaudio/Makefile         |  26 ++++++++++
 audio/portaudio/PLIST            |   5 ++
 audio/portaudio/buildlink2.mk    |  19 +++++++
 audio/portaudio/buildlink3.mk    |  23 +++++++++
 audio/portaudio/distinfo         |   9 +++
 audio/portaudio/patches/patch-aa |  99 ++++++++++++++++++++++++++++++++++++++++
 audio/portaudio/patches/patch-ac |  19 +++++++
 audio/portaudio/patches/patch-ad |  20 ++++++++
 audio/portaudio/patches/patch-ae |  15 ++++++
 audio/portaudio/patches/patch-af |  27 ++++++++++
 11 files changed, 274 insertions(+), 0 deletions(-)

diffs (truncated from 318 to 300 lines):

diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/DESCR     Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,12 @@
+PortAudio is a free, cross platform, open-source, audio I/O library.  It
+lets you write simple audio programs in 'C' that will compile and run on
+many platforms including Windows, Macintosh (8,9,X), Unix (OSS), SGI, and
+BeOS. PortAudio is intended to promote the exchange of audio synthesis
+software between developers on different platforms, and was recently
+selected as the audio component of a larger PortMusic project that includes
+MIDI and sound file support. 
+
+PortAudio provides a very simple API for recording and/or playing sound
+using a simple callback function.  Example programs are included that
+synthesize sine waves and pink noise, perform fuzz distortion on a guitar,
+list available audio devices, etc.
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/Makefile  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+#
+
+DISTNAME=              portaudio_v18_1
+PKGNAME=               portaudio-18.1
+CATEGORIES=            audio
+MASTER_SITES=          http://www.portaudio.com/archives/
+EXTRACT_SUFX=          .zip
+
+MAINTAINER=            dotz%irc.pl@localhost
+HOMEPAGE=              http://www.portaudio.com/archives/
+COMMENT=               Portable cross-platform Audio API
+
+HAS_CONFIGURE=         YES
+USE_GNU_TOOLS+=                make
+USE_BUILDLINK3=                YES
+
+CONFIGURE_ARGS=                --prefix=${PREFIX}
+EXTRACT_CMD_OPTS.zip=  -aqo
+
+pre-configure:
+       ${CHMOD} 755 ${WRKSRC}/configure
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/ossaudio.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/PLIST     Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+include/portaudio.h
+lib/libportaudio.a
+lib/libportaudio.so.0.0.18
+lib/libportaudio.so
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/buildlink2.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/buildlink2.mk     Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink2.mk,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+
+.if !defined(PORTAUDIO_BUILDLINK2_MK)
+PORTAUDIO_BUILDLINK2_MK=       # defined
+
+BUILDLINK_PACKAGES+=           portaudio
+BUILDLINK_DEPENDS.portaudio?=  portaudio>=18.1
+BUILDLINK_PKGSRCDIR.portaudio?=        ../../wip/portaudio
+
+EVAL_PREFIX+=                  BUILDLINK_PREFIX.portaudio=portaudio
+BUILDLINK_PREFIX.portaudio_DEFAULT=    ${LOCALBASE}
+BUILDLINK_FILES.portaudio=     include/portaudio.h
+BUILDLINK_FILES.portaudio+=    lib/libportaudio.*
+
+BUILDLINK_TARGETS+=    portaudio-buildlink
+
+portaudio-buildlink: _BUILDLINK_USE
+
+.endif # PORTAUDIO_BUILDLINK2_MK
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/buildlink3.mk     Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+# XXX
+# XXX This file was created automatically using createbuildlink-3.3.
+# XXX After this file as been verified as correct, the comment lines
+# XXX beginning with "XXX" should be removed.  Please do not commit
+# XXX unverified buildlink[23].mk files.
+
+BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH}+
+PORTAUDIO_BUILDLINK3_MK:=      ${PORTAUDIO_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+=    portaudio
+.endif
+
+BUILDLINK_PACKAGES:=   ${BUILDLINK_PACKAGES:Nportaudio}
+BUILDLINK_PACKAGES+=   portaudio
+
+.if !empty(PORTAUDIO_BUILDLINK3_MK:M+)
+BUILDLINK_DEPENDS.portaudio+=  portaudio>=18.1
+BUILDLINK_PKGSRCDIR.portaudio?=        ../../wip/portaudio
+.endif # PORTAUDIO_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:=     ${BUILDLINK_DEPTH:S/+$//}
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/distinfo  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+
+SHA1 (portaudio_v18_1.zip) = a460ac5484137d77df17a95ce844ff7f178305b1
+Size (portaudio_v18_1.zip) = 550130 bytes
+SHA1 (patch-aa) = e522bfbf7f69d6f15fd0a32e01a480db922acc56
+SHA1 (patch-ac) = de0d99b71e09f9bbcd5d838188e5dc8d68d09a46
+SHA1 (patch-ad) = 5a343e721ae183facc58195026c7e5c49536632a
+SHA1 (patch-ae) = c2744f10d80a478ad571fcce82bf301d6c50cb59
+SHA1 (patch-af) = da42578e66137f95edbbb86bde724af32e398d57
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-aa  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,99 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+
+--- pa_unix_oss/pa_unix.c.orig Sat Nov 22 17:06:46 2003
++++ pa_unix_oss/pa_unix.c      Sat Nov 22 17:13:50 2003
+@@ -375,7 +375,11 @@
+  * and the watchdog will detect it.
+  */
+ 
+-#define SCHEDULER_POLICY         SCHED_RR
++#ifndef _POSIX_THREAD_IS_GNU_PTH
++# define SCHEDULER_POLICY         SCHED_RR
++#else
++# define SCHEDULER_POLICY 0
++#endif
+ #define WATCHDOG_MAX_SECONDS    (3)
+ #define WATCHDOG_INTERVAL_USEC  (1000000)
+ 
+@@ -411,13 +415,16 @@
+ 
+ static PaError PaHost_WatchDogProc( PaHostSoundControl   *pahsc )
+ {
++#ifndef _POSIX_THREAD_IS_GNU_PTH
+     struct sched_param    schp = { 0 };
++#endif
+     int                   maxPri;
+ 
+ #ifdef GNUSTEP
+     GSRegisterCurrentThread(); /* SB20010904 */
+ #endif
+ 
++#ifndef _POSIX_THREAD_IS_GNU_PTH
+ /* Run at a priority level above audio thread so we can still run if it hangs. */
+ /* Rise more than 1 because of rumored off-by-one scheduler bugs. */
+     schp.sched_priority = pahsc->pahsc_AudioPriority + 4;
+@@ -429,7 +436,7 @@
+         ERR_RPT(("PaHost_WatchDogProc: cannot set watch dog priority!\n"));
+         goto killAudio;
+     }
+-
++#endif
+     /* Compare watchdog time with audio and canary thread times. */
+     /* Sleep for a while or until thread cancelled. */
+     while( pahsc->pahsc_WatchDogRun )
+@@ -465,7 +472,8 @@
+     return 0;
+ 
+ lowerAudio:
+-    {
++#ifndef _POSIX_THREAD_IS_GNU_PTH
++     {
+         struct sched_param    schat = { 0 };
+         if( sched_setscheduler(pahsc->pahsc_AudioThreadPID, SCHED_OTHER, &schat) != 0)
+         {
+@@ -478,7 +486,9 @@
+             goto cleanup;
+         }
+     }
+-
++#else
++   goto cleanup;
++#endif
+ killAudio:
+     ERR_RPT(("PaHost_WatchDogProc: killing hung audio thread!\n"));
+     pthread_kill( pahsc->pahsc_AudioThread, SIGKILL );
+@@ -574,18 +584,19 @@
+ {
+     PaHostSoundControl  *pahsc;
+     PaError              result = paNoError;
++#ifndef _POSIX_THREAD_IS_GNU_PTH   
+     struct sched_param   schp = { 0 };
+-
++#endif
+     pahsc = (PaHostSoundControl *) past->past_DeviceData;
+     if( pahsc == NULL ) return paInternalError;
+ 
+     pahsc->pahsc_AudioThreadPID = getpid();
+     DBUG(("PaHost_BoostPriority: audio PID = %d\n", pahsc->pahsc_AudioThreadPID ));
+-
++#ifndef _POSIX_THREAD_IS_GNU_PTH
+     /* Choose a priority in the middle of the range. */
+     pahsc->pahsc_AudioPriority = (sched_get_priority_max(SCHEDULER_POLICY) -
+                                   sched_get_priority_min(SCHEDULER_POLICY)) / 2;
+-    schp.sched_priority = pahsc->pahsc_AudioPriority;
++   schp.sched_priority = pahsc->pahsc_AudioPriority;
+ 
+     if (sched_setscheduler(0, SCHEDULER_POLICY, &schp) != 0)
+     {
+@@ -597,7 +608,10 @@
+         /* We are running at high priority so we should have a watchdog in case audio goes wild. */
+         result = PaHost_StartWatchDog( pahsc );
+     }
+-
++#else
++   DBUG(("PortAudio: audio callback priority set to level %d - call ignored with GNU Pth\n", schp.sched_priority));
++   result = PaHost_StartWatchDog( pahsc );
++#endif
+     return result;
+ }
+ 
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-ac  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+
+--- Makefile.in.orig   Tue Feb 11 23:24:56 2003
++++ Makefile.in
+@@ -7,12 +7,12 @@
+ PREFIX = @prefix@
+ CC = @CC@
+ CFLAGS = @CFLAGS@ -Ipa_common
+-LIBS = @LIBS@
++LIBS = ${LIBOSSAUDIO} -L@prefix@/lib -Wl,${RPATH_FLAG} @prefix@/lib @LIBS@
+ AR = @AR@
+ RANLIB = @RANLIB@
+ INSTALL = @INSTALL@
+ SHARED_FLAGS = @SHARED_FLAGS@
+-DLL_LIBS = @DLL_LIBS@
++DLL_LIBS = @DLL_LIBS@ ${LIBOSSAUDIO}
+ 
+ OTHER_OBJS = @OTHER_OBJS@
+ 
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-ad  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/04/20 17:52:48 ben Exp $
+
+--- pa_tests/patest_record.c.orig      Sat Nov 22 17:26:48 2003
++++ pa_tests/patest_record.c   Sat Nov 22 17:27:12 2003
+@@ -133,6 +133,7 @@
+                          unsigned long framesPerBuffer,
+                          PaTimestamp outTime, void *userData )
+ {
++    int framesToPlay, samplesToPlay, samplesPerBuffer;
+     paTestData *data = (paTestData*)userData;
+     SAMPLE *rptr = &data->recordedSamples[data->frameIndex * NUM_CHANNELS];
+     SAMPLE *wptr = (SAMPLE*)outputBuffer;
+@@ -141,7 +142,6 @@
+     unsigned int framesLeft = data->maxFrameIndex - data->frameIndex;
+     (void) inputBuffer; /* Prevent unused variable warnings. */
+     (void) outTime;
+-    int framesToPlay, samplesToPlay, samplesPerBuffer;
+ 
+     if( framesLeft < framesPerBuffer )
+     {
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-ae  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/04/20 17:52:49 ben Exp $
+
+--- pa_tests/patest_wire.c.orig        Sat Nov 22 17:27:23 2003
++++ pa_tests/patest_wire.c     Sat Nov 22 17:27:54 2003
+@@ -74,9 +74,9 @@
+     SAMPLE *out = (SAMPLE*)outputBuffer;
+     SAMPLE *in = (SAMPLE*)inputBuffer;
+     unsigned int i;
+-    (void) outTime;
+     int samplesPerFrame;
+     int numSamples;
++    (void) outTime;
+     
+     samplesPerFrame = (int) userData;
+     numSamples =  framesPerBuffer * samplesPerFrame;
diff -r 1343672dfb32 -r d16d317e00c0 audio/portaudio/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-af  Tue Apr 20 17:52:48 2004 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-af,v 1.1.1.1 2004/04/20 17:52:49 ben Exp $
+
+--- pa_unix_oss/pa_unix_oss.c~ Mon Jun 30 11:05:50 2003
++++ pa_unix_oss/pa_unix_oss.c  Wed Nov 26 02:40:25 2003
+@@ -47,6 +47,9 @@
+ #include <machine/soundcard.h> /* JH20010905 */
+ #endif
+ 
++#ifdef __NetBSD__



Home | Main Index | Thread Index | Old Index