import portaudio v19 snapshot
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. ok deanna@
This commit is contained in:
parent
6cfe0c992f
commit
ace82ffad3
31
audio/portaudio-svn/Makefile
Normal file
31
audio/portaudio-svn/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
|
||||
|
||||
COMMENT= portable cross-platform audio API
|
||||
DISTNAME= portaudio-svn-1286
|
||||
|
||||
SHARED_LIBS= portaudio 0.0
|
||||
|
||||
CATEGORIES= audio
|
||||
HOMEPAGE= http://www.portaudio.com/
|
||||
MAINTAINER= Jacob Meuser <jakemsr@openbsd.org>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB= m
|
||||
|
||||
MASTER_SITES= http://jakemsr.trancell.org/distfiles/
|
||||
|
||||
USE_GMAKE= Yes
|
||||
USE_LIBTOOL= Yes
|
||||
CONFIGURE_STYLE= gnu
|
||||
CONFIGURE_ARGS= --without-alsa \
|
||||
--without-jack
|
||||
|
||||
# builds non-automated, interactive tests in ${WRKBUILD}/bin
|
||||
NO_REGRESS= Yes
|
||||
|
||||
.include <bsd.port.mk>
|
5
audio/portaudio-svn/distinfo
Normal file
5
audio/portaudio-svn/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (portaudio-svn-1286.tar.gz) = HylU2ifgNJQBVaN8nY1lxg==
|
||||
RMD160 (portaudio-svn-1286.tar.gz) = FPa+M7uL8l5KKEoreyJhVA14858=
|
||||
SHA1 (portaudio-svn-1286.tar.gz) = 3XJS07HBk19mlHTdLmqgXng0fU4=
|
||||
SHA256 (portaudio-svn-1286.tar.gz) = U2kBEmNfY6iT60Sh0HGmS0xgYqH1FGyM579+zD5i89M=
|
||||
SIZE (portaudio-svn-1286.tar.gz) = 1114991
|
49
audio/portaudio-svn/patches/patch-configure
Normal file
49
audio/portaudio-svn/patches/patch-configure
Normal file
@ -0,0 +1,49 @@
|
||||
$OpenBSD: patch-configure,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
|
||||
--- configure.orig Sun Aug 26 00:06:14 2007
|
||||
+++ configure Mon Aug 27 00:57:51 2007
|
||||
@@ -19714,7 +19714,7 @@ fi
|
||||
|
||||
|
||||
|
||||
-for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h
|
||||
+for ac_header in sys/soundcard.h linux/soundcard.h machine/soundcard.h soundcard.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
||||
@@ -19848,7 +19848,7 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
-
|
||||
+LIBS="$LIBS -lossaudio"
|
||||
fi
|
||||
|
||||
done
|
||||
@@ -21602,13 +21602,13 @@ _ACEOF
|
||||
|
||||
*)
|
||||
|
||||
- { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
|
||||
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
|
||||
+ { echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5
|
||||
+echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lpthread $LIBS"
|
||||
+LIBS="-pthread $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
@@ -21711,8 +21711,8 @@ _ACEOF
|
||||
fi
|
||||
|
||||
THREAD_CFLAGS="-pthread"
|
||||
- DLL_LIBS="$DLL_LIBS -lm -lpthread";
|
||||
- LIBS="$LIBS -lm -lpthread";
|
||||
+ DLL_LIBS="$DLL_LIBS -lm -pthread";
|
||||
+ LIBS="$LIBS -lm -pthread";
|
||||
PADLL="libportaudio.so";
|
||||
SHARED_FLAGS="-shared -fPIC";
|
||||
|
@ -0,0 +1,80 @@
|
||||
$OpenBSD: patch-src_hostapi_oss_pa_unix_oss_c,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
|
||||
--- src/hostapi/oss/pa_unix_oss.c.orig Sat Sep 29 19:11:09 2007
|
||||
+++ src/hostapi/oss/pa_unix_oss.c Sat Sep 29 21:45:19 2007
|
||||
@@ -72,6 +72,9 @@
|
||||
#elif defined(HAVE_MACHINE_SOUNDCARD_H)
|
||||
# include <machine/soundcard.h> /* JH20010905 */
|
||||
# define DEVICE_NAME_BASE "/dev/audio"
|
||||
+#elif defined(HAVE_SOUNDCARD_H)
|
||||
+# include <soundcard.h>
|
||||
+# define DEVICE_NAME_BASE "/dev/audio"
|
||||
#else
|
||||
# error No sound card header file
|
||||
#endif
|
||||
@@ -403,8 +406,12 @@ static PaError QueryDirection( const char *deviceName,
|
||||
sr = 44100;
|
||||
if( ioctl( devHandle, SNDCTL_DSP_SPEED, &sr ) < 0 )
|
||||
{
|
||||
- result = paUnanticipatedHostError;
|
||||
- goto error;
|
||||
+ sr = 48000;
|
||||
+ if( ioctl( devHandle, SNDCTL_DSP_SPEED, &sr ) < 0 )
|
||||
+ {
|
||||
+ result = paUnanticipatedHostError;
|
||||
+ goto error;
|
||||
+ }
|
||||
}
|
||||
|
||||
*defaultSampleRate = sr;
|
||||
@@ -810,9 +817,11 @@ static PaError OpenDevices( const char *idevName, cons
|
||||
ENSURE_( *idev = open( idevName, flags ), paDeviceUnavailable );
|
||||
PA_ENSURE( ModifyBlocking( *idev, 1 ) ); /* Blocking */
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
/* Initially disable */
|
||||
enableBits = ~PCM_ENABLE_INPUT;
|
||||
ENSURE_( ioctl( *idev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
|
||||
+#endif
|
||||
}
|
||||
if( odevName )
|
||||
{
|
||||
@@ -821,9 +830,11 @@ static PaError OpenDevices( const char *idevName, cons
|
||||
ENSURE_( *odev = open( odevName, flags ), paDeviceUnavailable );
|
||||
PA_ENSURE( ModifyBlocking( *odev, 1 ) ); /* Blocking */
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
/* Initially disable */
|
||||
enableBits = ~PCM_ENABLE_OUTPUT;
|
||||
ENSURE_( ioctl( *odev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1226,10 +1237,12 @@ static PaError OpenStream( struct PaUtilHostApiReprese
|
||||
}
|
||||
}
|
||||
|
||||
+#if 0
|
||||
/* Round framesPerBuffer to the next power-of-two to make OSS happy. */
|
||||
framesPerBuffer &= INT_MAX;
|
||||
for (i = 1; framesPerBuffer > i; i <<= 1) ;
|
||||
framesPerBuffer = i;
|
||||
+#endif
|
||||
|
||||
/* allocate and do basic initialization of the stream structure */
|
||||
PA_UNLESS( stream = (PaOssStream*)PaUtil_AllocateMemory( sizeof(PaOssStream) ), paInsufficientMemory );
|
||||
@@ -1942,11 +1955,11 @@ static signed long GetStreamReadAvailable( PaStream* s
|
||||
static signed long GetStreamWriteAvailable( PaStream* s )
|
||||
{
|
||||
PaOssStream *stream = (PaOssStream*)s;
|
||||
- int delay = 0;
|
||||
+ struct count_info delay;
|
||||
|
||||
- if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 )
|
||||
+ if( ioctl( stream->playback->fd, SNDCTL_DSP_GETOPTR, &delay ) < 0 )
|
||||
return paUnanticipatedHostError;
|
||||
|
||||
- return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback );
|
||||
+ return (PaOssStreamComponent_BufferSize( stream->playback ) - delay.ptr) / PaOssStreamComponent_FrameSize( stream->playback );
|
||||
}
|
||||
|
5
audio/portaudio-svn/pkg/DESCR
Normal file
5
audio/portaudio-svn/pkg/DESCR
Normal file
@ -0,0 +1,5 @@
|
||||
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.
|
2
audio/portaudio-svn/pkg/PFRAG.shared
Normal file
2
audio/portaudio-svn/pkg/PFRAG.shared
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
|
||||
@lib lib/libportaudio.so.${LIBportaudio_VERSION}
|
7
audio/portaudio-svn/pkg/PLIST
Normal file
7
audio/portaudio-svn/pkg/PLIST
Normal file
@ -0,0 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/10/27 08:59:04 jakemsr Exp $
|
||||
include/portaudio.h
|
||||
%%SHARED%%
|
||||
lib/libportaudio.a
|
||||
lib/libportaudio.la
|
||||
lib/pkgconfig/
|
||||
lib/pkgconfig/portaudio-2.0.pc
|
Loading…
Reference in New Issue
Block a user