# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= portaudio VERSION= 190700_20210406 REVISION= 3 KEYWORDS= audio VARIANTS= standard SDESC[standard]= Cross platform audio I/O library HOMEPAGE= https://www.portaudio.com/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://files.portaudio.com/archives/ DISTFILE[1]= pa_stable_v190700_20210406.tgz:main DF_INDEX= 1 SPKGS[standard]= complete primary docs examples OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= doxygen:single:standard USES= autoreconf c++:primary dos2unix gmake libtool pkgconfig DISTNAME= portaudio LICENSE= MIT:primary LICENSE_FILE= MIT:{{WRKSRC}}/LICENSE.txt LICENSE_SCHEME= solo FPC_EQUIVALENT= audio/portaudio MUST_CONFIGURE= gnu CONFIGURE_ARGS= --enable-cxx --without-alsa --without-jack --without-sndio SINGLE_JOB= yes INSTALL_REQ_TOOLCHAIN= yes SOVERSION= 2.0.0 PLIST_SUB= SOVERSION_CPP=0.0.12 SOMAJOR_CPP=0 post-install: # install documentation ${MKDIR} ${STAGEDIR}${STD_DOCDIR} (cd ${WRKSRC} && doxygen) (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${STD_DOCDIR}) (cd ${WRKSRC} && ${INSTALL_DATA} README.md ${STAGEDIR}${STD_DOCDIR}) # install examples ${MKDIR} ${STAGEDIR}${STD_EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/bindings/cpp/example/*.cxx \ ${WRKSRC}/examples/*.c ${WRKSRC}/examples/*.cpp \ ${STAGEDIR}${STD_EXAMPLESDIR} # install provided header file ${INSTALL_DATA} ${FILESDIR}/pa_unix_oss.h ${STAGEDIR}${PREFIX}/include # strip libraries ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so pre-configure: # autoreconf another directory cd ${WRKSRC}/bindings/cpp && ${AUTORECONF} -f -i [FILE:607:descriptions/desc.primary] PortAudio is a free, cross-platform, open-source, audio I/O library. It enables simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. PortAudio provides a very simple API for recording and/or playing sound using a simple callback function or a blocking read/write interface. Example programs are included that play sine waves, process audio input (guitar fuzz), record and playback audio, list available audio devices, etc. [FILE:109:distinfo] 47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def 1462695 pa_stable_v190700_20210406.tgz [FILE:722:manifests/plist.primary] include/ pa_unix_oss.h portaudio.h include/portaudiocpp/ AutoSystem.hxx BlockingStream.hxx CFunCallbackStream.hxx CallbackInterface.hxx CallbackStream.hxx CppFunCallbackStream.hxx Device.hxx DirectionSpecificStreamParameters.hxx Exception.hxx HostApi.hxx InterfaceCallbackStream.hxx MemFunCallbackStream.hxx PortAudioCpp.hxx SampleDataFormat.hxx Stream.hxx StreamParameters.hxx System.hxx SystemDeviceIterator.hxx SystemHostApiIterator.hxx lib/ libportaudio.a libportaudio.so libportaudio.so.%%SOMAJOR%% libportaudio.so.%%SOVERSION%% libportaudiocpp.a libportaudiocpp.so libportaudiocpp.so.%%SOMAJOR_CPP%% libportaudiocpp.so.%%SOVERSION_CPP%% lib/pkgconfig/ portaudio-2.0.pc portaudiocpp.pc [FILE:3694:manifests/plist.docs] share/doc/portaudio/README.md share/doc/portaudio/html/ License.html annotated.html api_overview.html bc_s.png bc_sd.png blocking_read_write.html classScopedPaHandler.html classSine.html classes.html clipboard.js closed.png compile_cmake.html compile_linux.html compile_mac_coreaudio.html compile_windows.html compile_windows_asio_msvc.html compile_windows_mingw.html deprecated.html dir_60aac7f36c34906fb3da763b5762f752.html dir_61c9e5842729cb34568d93cb98ad85b9.html dir_d28a4824dc47e487b107a5db32ef43c4.html dir_d44c64559bbebec7f509842c48db8b23.html dir_e68e8157741866f444e17edd764ebbae.html doc.svg docd.svg doxygen.css doxygen.svg doxygen_crawl.html dynsections.js exploring.html files.html folderclosed.svg folderclosedd.svg folderopen.svg folderopend.svg functions.html functions_vars.html globals.html globals_defs.html globals_enum.html globals_eval.html globals_func.html globals_type.html group__examples__src.html group__public__header.html index.html initializing_portaudio.html jquery.js menu.js menudata.js minus.svg minusd.svg nav_f.png nav_fd.png nav_g.png nav_h.png nav_hd.png open.png open_default_stream.html pa__asio_8h.html pa__asio_8h_source.html pa__devs_8c.html pa__devs_8c_source.html pa__fuzz_8c.html pa__fuzz_8c_source.html pa__jack_8h.html pa__jack_8h_source.html pa__linux__alsa_8h.html pa__linux__alsa_8h_source.html pa__mac__core_8h.html pa__mac__core_8h_source.html pa__win__ds_8h.html pa__win__ds_8h_source.html pa__win__wasapi_8h.html pa__win__wasapi_8h_source.html pa__win__waveformat_8h.html pa__win__waveformat_8h_source.html pa__win__wdmks_8h.html pa__win__wdmks_8h_source.html pa__win__wmme_8h.html pa__win__wmme_8h_source.html paex__mono__asio__channel__select_8c.html paex__mono__asio__channel__select_8c_source.html paex__ocean__shore_8c.html paex__ocean__shore_8c_source.html paex__pink_8c.html paex__pink_8c_source.html paex__read__write__wire_8c.html paex__read__write__wire_8c_source.html paex__record_8c.html paex__record_8c_source.html paex__record__file_8c.html paex__record__file_8c_source.html paex__saw_8c.html paex__saw_8c_source.html paex__sine_8c.html paex__sine_8c_source.html paex__sine__c_09_09_8cpp_source.html paex__wmme__ac3_8c.html paex__wmme__ac3_8c_source.html paex__wmme__surround_8c.html paex__wmme__surround_8c_source.html paex__write__sine_8c.html paex__write__sine_8c_source.html paex__write__sine__nonint_8c.html paex__write__sine__nonint_8c_source.html pages.html plus.svg plusd.svg portaudio-external-architecture-diagram.png portaudio_8h.html portaudio_8h_source.html querying_devices.html splitbar.png splitbard.png start_stop_abort.html structBiQuad.html structOceanWave.html structPaAlsaStreamInfo.html structPaAsioStreamInfo.html structPaDeviceInfo.html structPaHostApiInfo.html structPaHostErrorInfo.html structPaMacCoreStreamInfo.html structPaStreamCallbackTimeInfo.html structPaStreamInfo.html structPaStreamParameters.html structPaVersionInfo.html structPaWDMKSDirectionSpecificStreamInfo.html structPaWDMKSSpecificStreamInfo.html structPaWasapiJackDescription.html structPaWasapiStreamInfo.html structPaWinDirectSoundStreamInfo.html structPaWinMmeDeviceAndChannelCount.html structPaWinMmeStreamInfo.html structPaWinWDMKSDeviceInfo.html structPaWinWDMKSInfo.html structPaWinWaveFormat.html structPinkNoise.html structpaTestData.html sync_off.png sync_on.png tab_a.png tab_ad.png tab_b.png tab_bd.png tab_h.png tab_hd.png tab_s.png tab_sd.png tabs.css terminating_portaudio.html topics.html tutorial_start.html utility_functions.html writing_a_callback.html [FILE:321:manifests/plist.examples] share/examples/portaudio/ devs.cxx pa_devs.c pa_fuzz.c paex_mono_asio_channel_select.c paex_ocean_shore.c paex_pink.c paex_read_write_wire.c paex_record.c paex_record_file.c paex_saw.c paex_sine.c paex_sine_c++.cpp paex_wmme_ac3.c paex_wmme_surround.c paex_write_sine.c paex_write_sine_nonint.c sine.cxx [FILE:250:patches/patch-Makefile.in] --- Makefile.in.orig 2021-04-01 00:35:41 UTC +++ Makefile.in @@ -146,6 +146,7 @@ SRC_DIRS = \ src/hostapi/dsound \ src/hostapi/jack \ src/hostapi/oss \ + src/hostapi/sndio \ src/hostapi/skeleton \ src/hostapi/wasapi \ src/hostapi/wdmks \ [FILE:1727:patches/patch-configure.in] $OpenBSD: patch-configure_in,v 1.4 2014/09/13 04:56:28 bentley Exp $ --- configure.in.orig 2021-04-01 00:35:42 UTC +++ configure.in @@ -33,6 +33,10 @@ AC_ARG_WITH(alsa, AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]), [with_alsa=$withval]) +AC_ARG_WITH(sndio, + AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]), + [with_sndio=$withval]) + AC_ARG_WITH(jack, AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]), [with_jack=$withval]) @@ -129,6 +133,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) @@ -401,6 +409,13 @@ case "${host_os}" in AC_DEFINE(PA_USE_ALSA,1) 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,1) + fi + if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then DLL_LIBS="$DLL_LIBS $JACK_LIBS" CFLAGS="$CFLAGS $JACK_CFLAGS" @@ -504,6 +519,7 @@ case "$target_os" in ;; *) AC_MSG_RESULT([ + Sndio ....................... $have_sndio OSS ......................... $have_oss JACK ........................ $have_jack ]) [FILE:836:patches/patch-include_portaudio.h] $OpenBSD: patch-include_portaudio_h,v 1.2 2013/03/12 00:59:50 brad Exp $ --- include/portaudio.h.orig 2021-04-01 00:35:42 UTC +++ include/portaudio.h @@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId paWDMKS=11, paJACK=12, paWASAPI=13, - paAudioScienceHPI=14 + paAudioScienceHPI=14, + paSndio=15 } PaHostApiTypeId; @@ -1200,6 +1201,15 @@ signed long Pa_GetStreamReadAvailable( P signed long Pa_GetStreamWriteAvailable( PaStream* stream ); +/** Retrieve the host type handling an open stream. + + @return Returns a non-negative value representing the host API type + handling an open stream or, a PaErrorCode (which are always negative) + if PortAudio is not initialized or an error is encountered. +*/ +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ); + + /* Miscellaneous utilities */ [FILE:1404:patches/patch-src_common_pa__front.c] --- src/common/pa_front.c.orig 2021-04-01 00:35:42 UTC +++ src/common/pa_front.c @@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream hostApiInputParametersPtr, hostApiOutputParametersPtr, sampleRate, framesPerBuffer, streamFlags, streamCallback, userData ); - if( result == paNoError ) + if( result == paNoError ) { AddOpenStream( *stream ); + PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type; + } PA_LOGAPI(("Pa_OpenStream returned:\n" )); @@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( return result; } +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ) +{ + PaError error = PaUtil_ValidateStreamPointer( stream ); + PaHostApiTypeId result; + +#ifdef PA_LOG_API_CALLS + PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" ); + PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream ); +#endif + + if( error == paNoError ) + { + result = PA_STREAM_REP(stream)->hostApiType; + } + else + { + result = (PaHostApiTypeId) error; + } + +#ifdef PA_LOG_API_CALLS + PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" ); + PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) ); +#endif + + return result; +} PaError Pa_GetSampleSize( PaSampleFormat format ) { [FILE:365:patches/patch-src_common_pa__stream.c] --- src/common/pa_stream.c.orig 2021-04-01 00:35:42 UTC +++ src/common/pa_stream.c @@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentati streamRepresentation->streamInfo.inputLatency = 0.; streamRepresentation->streamInfo.outputLatency = 0.; streamRepresentation->streamInfo.sampleRate = 0.; + + streamRepresentation->hostApiType = 0; } [FILE:319:patches/patch-src_common_pa__stream.h] --- src/common/pa_stream.h.orig 2021-04-01 00:35:42 UTC +++ src/common/pa_stream.h @@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentatio PaStreamFinishedCallback *streamFinishedCallback; void *userData; PaStreamInfo streamInfo; + PaHostApiTypeId hostApiType; } PaUtilStreamRepresentation; [FILE:728:patches/patch-src_hostapi_oss_pa__unix__oss.c] --- src/hostapi/oss/pa_unix_oss.c.orig 2021-04-01 00:35:42 UTC +++ src/hostapi/oss/pa_unix_oss.c @@ -2032,6 +2032,30 @@ error: return result; } +const char *PaOSS_GetStreamInputDevice( PaStream* s ) +{ + PaOssStream *stream = (PaOssStream*)s; + + if( stream->capture ) + { + return stream->capture->devName; + } + + return NULL; +} + +const char *PaOSS_GetStreamOutputDevice( PaStream* s ) +{ + PaOssStream *stream = (PaOssStream*)s; + + if( stream->playback ) + { + return stream->playback->devName; + } + + return NULL; +} + /* TODO: Compute number of allocated bytes somewhere else, can we use ODELAY with capture */ static signed long GetStreamWriteAvailable( PaStream* s ) [FILE:1016:patches/patch-src_os_unix_pa__unix__hostapis.c] $OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.2 2013/03/12 00:59:50 brad Exp $ Difference to OpenBSD patch: PA_USE_SNDIO has been moved before PA_USE_OSS, so that portaudio prefers the sndio output. --- src/os/unix/pa_unix_hostapis.c.orig 2021-04-01 00:35:42 UTC +++ src/os/unix/pa_unix_hostapis.c @@ -44,6 +44,7 @@ PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); +PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); /* Added for IRIX, Pieter, oct 2, 2003: */ PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); @@ -69,6 +70,10 @@ PaUtilHostApiInitializer *paHostApiIniti #else /* __linux__ */ +#ifdef PA_USE_SNDIO + PaSndio_Initialize, +#endif + #if PA_USE_OSS PaOSS_Initialize, #endif [FILE:1787:files/pa_unix_oss.h] #ifndef PA_UNIX_OSS_H #define PA_UNIX_OSS_H /* * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ * PortAudio Portable Real-Time Audio Library * OSS-specific extensions * * Copyright (c) 1999-2000 Ross Bencina and Phil Burk * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * Any person wishing to distribute modifications to the Software is * requested to send the modifications to the original developer so that * they can be incorporated into the canonical version. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ /** @file * OSS-specific PortAudio API extension header file. */ #ifdef __cplusplus extern "C" { #endif const char *PaOSS_GetStreamInputDevice( PaStream *s ); const char *PaOSS_GetStreamOutputDevice( PaStream *s ); #ifdef __cplusplus } #endif #endif