1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
4 VERSION= 190700_20210406
8 SDESC[standard]= Cross platform audio I/O library
9 HOMEPAGE= https://www.portaudio.com/
13 SITES[main]= https://files.portaudio.com/archives/
14 DISTFILE[1]= pa_stable_v190700_20210406.tgz:main
16 SPKGS[standard]= complete
21 OPTIONS_AVAILABLE= none
22 OPTIONS_STANDARD= none
24 BUILD_DEPENDS= doxygen:single:standard
26 USES= autoreconf c++:primary dos2unix gmake libtool
32 LICENSE_FILE= MIT:{{WRKSRC}}/LICENSE.txt
35 FPC_EQUIVALENT= audio/portaudio
38 CONFIGURE_ARGS= --enable-cxx
45 INSTALL_REQ_TOOLCHAIN= yes
47 PLIST_SUB= SOVERSION_CPP=0.0.12
51 # install documentation
52 ${MKDIR} ${STAGEDIR}${STD_DOCDIR}
53 (cd ${WRKSRC} && doxygen)
54 (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${STD_DOCDIR})
55 (cd ${WRKSRC} && ${INSTALL_DATA} README.md ${STAGEDIR}${STD_DOCDIR})
57 ${MKDIR} ${STAGEDIR}${STD_EXAMPLESDIR}
58 ${INSTALL_DATA} ${WRKSRC}/bindings/cpp/example/*.cxx \
59 ${WRKSRC}/examples/*.c ${WRKSRC}/examples/*.cpp \
60 ${STAGEDIR}${STD_EXAMPLESDIR}
61 # install provided header file
62 ${INSTALL_DATA} ${FILESDIR}/pa_unix_oss.h ${STAGEDIR}${PREFIX}/include
64 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
67 # autoreconf another directory
68 cd ${WRKSRC}/bindings/cpp && ${AUTORECONF} -f -i
70 [FILE:607:descriptions/desc.primary]
71 PortAudio is a free, cross-platform, open-source, audio I/O library.
72 It enables simple audio programs in 'C' or C++ that will compile and run
73 on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA).
74 It is intended to promote the exchange of audio software between developers
75 on different platforms.
77 PortAudio provides a very simple API for recording and/or playing sound
78 using a simple callback function or a blocking read/write interface.
79 Example programs are included that play sine waves, process audio input
80 (guitar fuzz), record and playback audio, list available audio devices,
85 47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def 1462695 pa_stable_v190700_20210406.tgz
88 [FILE:722:manifests/plist.primary]
95 CFunCallbackStream.hxx
98 CppFunCallbackStream.hxx
100 DirectionSpecificStreamParameters.hxx
103 InterfaceCallbackStream.hxx
104 MemFunCallbackStream.hxx
110 SystemDeviceIterator.hxx
111 SystemHostApiIterator.hxx
115 libportaudio.so.%%SOMAJOR%%
116 libportaudio.so.%%SOVERSION%%
119 libportaudiocpp.so.%%SOMAJOR_CPP%%
120 libportaudiocpp.so.%%SOVERSION_CPP%%
126 [FILE:3660:manifests/plist.docs]
127 share/doc/portaudio/README.md
128 share/doc/portaudio/html/
134 blocking_read_write.html
135 classScopedPaHandler.html
141 compile_mac_coreaudio.html
143 compile_windows_asio_msvc.html
144 compile_windows_mingw.html
146 dir_60aac7f36c34906fb3da763b5762f752.html
147 dir_61c9e5842729cb34568d93cb98ad85b9.html
148 dir_d28a4824dc47e487b107a5db32ef43c4.html
149 dir_d44c64559bbebec7f509842c48db8b23.html
150 dir_e68e8157741866f444e17edd764ebbae.html
170 group__examples__src.html
171 group__public__header.html
173 initializing_portaudio.html
185 open_default_stream.html
187 pa__asio_8h_source.html
189 pa__devs_8c_source.html
191 pa__fuzz_8c_source.html
193 pa__jack_8h_source.html
194 pa__linux__alsa_8h.html
195 pa__linux__alsa_8h_source.html
196 pa__mac__core_8h.html
197 pa__mac__core_8h_source.html
199 pa__win__ds_8h_source.html
200 pa__win__wasapi_8h.html
201 pa__win__wasapi_8h_source.html
202 pa__win__waveformat_8h.html
203 pa__win__waveformat_8h_source.html
204 pa__win__wdmks_8h.html
205 pa__win__wdmks_8h_source.html
206 pa__win__wmme_8h.html
207 pa__win__wmme_8h_source.html
208 paex__mono__asio__channel__select_8c.html
209 paex__mono__asio__channel__select_8c_source.html
210 paex__ocean__shore_8c.html
211 paex__ocean__shore_8c_source.html
213 paex__pink_8c_source.html
214 paex__read__write__wire_8c.html
215 paex__read__write__wire_8c_source.html
217 paex__record_8c_source.html
218 paex__record__file_8c.html
219 paex__record__file_8c_source.html
221 paex__saw_8c_source.html
223 paex__sine_8c_source.html
224 paex__sine__c_09_09_8cpp_source.html
225 paex__wmme__ac3_8c.html
226 paex__wmme__ac3_8c_source.html
227 paex__wmme__surround_8c.html
228 paex__wmme__surround_8c_source.html
229 paex__write__sine_8c.html
230 paex__write__sine_8c_source.html
231 paex__write__sine__nonint_8c.html
232 paex__write__sine__nonint_8c_source.html
236 portaudio-external-architecture-diagram.png
238 portaudio_8h_source.html
239 querying_devices.html
242 start_stop_abort.html
245 structPaAlsaStreamInfo.html
246 structPaAsioStreamInfo.html
247 structPaDeviceInfo.html
248 structPaHostApiInfo.html
249 structPaHostErrorInfo.html
250 structPaMacCoreStreamInfo.html
251 structPaStreamCallbackTimeInfo.html
252 structPaStreamInfo.html
253 structPaStreamParameters.html
254 structPaVersionInfo.html
255 structPaWDMKSDirectionSpecificStreamInfo.html
256 structPaWDMKSSpecificStreamInfo.html
257 structPaWasapiJackDescription.html
258 structPaWasapiStreamInfo.html
259 structPaWinDirectSoundStreamInfo.html
260 structPaWinMmeDeviceAndChannelCount.html
261 structPaWinMmeStreamInfo.html
262 structPaWinWDMKSDeviceInfo.html
263 structPaWinWDMKSInfo.html
264 structPaWinWaveFormat.html
266 structpaTestData.html
278 terminating_portaudio.html
281 utility_functions.html
282 writing_a_callback.html
285 [FILE:321:manifests/plist.examples]
286 share/examples/portaudio/
290 paex_mono_asio_channel_select.c
293 paex_read_write_wire.c
302 paex_write_sine_nonint.c
306 [FILE:250:patches/patch-Makefile.in]
307 --- Makefile.in.orig 2021-04-01 00:35:41 UTC
309 @@ -146,6 +146,7 @@ SRC_DIRS = \
313 + src/hostapi/sndio \
314 src/hostapi/skeleton \
319 [FILE:1727:patches/patch-configure.in]
320 $OpenBSD: patch-configure_in,v 1.4 2014/09/13 04:56:28 bentley Exp $
321 --- configure.in.orig 2021-04-01 00:35:42 UTC
323 @@ -33,6 +33,10 @@ AC_ARG_WITH(alsa,
324 AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
325 [with_alsa=$withval])
328 + AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
329 + [with_sndio=$withval])
332 AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
333 [with_jack=$withval])
334 @@ -129,6 +133,10 @@ have_alsa=no
335 if test "x$with_alsa" != "xno"; then
336 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
339 +if test "x$with_sndio" != "xno"; then
340 + AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
343 if test "x$with_asihpi" != "xno"; then
344 AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
345 @@ -401,6 +409,13 @@ case "${host_os}" in
346 AC_DEFINE(PA_USE_ALSA,1)
349 + if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
350 + DLL_LIBS="$DLL_LIBS -lsndio"
351 + LIBS="$LIBS -lsndio"
352 + OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
353 + AC_DEFINE(PA_USE_SNDIO,1)
356 if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
357 DLL_LIBS="$DLL_LIBS $JACK_LIBS"
358 CFLAGS="$CFLAGS $JACK_CFLAGS"
359 @@ -504,6 +519,7 @@ case "$target_os" in
363 + Sndio ....................... $have_sndio
364 OSS ......................... $have_oss
365 JACK ........................ $have_jack
369 [FILE:836:patches/patch-include_portaudio.h]
370 $OpenBSD: patch-include_portaudio_h,v 1.2 2013/03/12 00:59:50 brad Exp $
371 --- include/portaudio.h.orig 2021-04-01 00:35:42 UTC
372 +++ include/portaudio.h
373 @@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
377 - paAudioScienceHPI=14
378 + paAudioScienceHPI=14,
383 @@ -1200,6 +1201,15 @@ signed long Pa_GetStreamReadAvailable( P
384 signed long Pa_GetStreamWriteAvailable( PaStream* stream );
387 +/** Retrieve the host type handling an open stream.
389 + @return Returns a non-negative value representing the host API type
390 + handling an open stream or, a PaErrorCode (which are always negative)
391 + if PortAudio is not initialized or an error is encountered.
393 +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
396 /* Miscellaneous utilities */
401 [FILE:1404:patches/patch-src_common_pa__front.c]
402 --- src/common/pa_front.c.orig 2021-04-01 00:35:42 UTC
403 +++ src/common/pa_front.c
404 @@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream
405 hostApiInputParametersPtr, hostApiOutputParametersPtr,
406 sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
408 - if( result == paNoError )
409 + if( result == paNoError ) {
410 AddOpenStream( *stream );
411 + PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
415 PA_LOGAPI(("Pa_OpenStream returned:\n" ));
416 @@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable(
420 +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
422 + PaError error = PaUtil_ValidateStreamPointer( stream );
423 + PaHostApiTypeId result;
425 +#ifdef PA_LOG_API_CALLS
426 + PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
427 + PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
430 + if( error == paNoError )
432 + result = PA_STREAM_REP(stream)->hostApiType;
436 + result = (PaHostApiTypeId) error;
439 +#ifdef PA_LOG_API_CALLS
440 + PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
441 + PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
447 PaError Pa_GetSampleSize( PaSampleFormat format )
451 [FILE:365:patches/patch-src_common_pa__stream.c]
452 --- src/common/pa_stream.c.orig 2021-04-01 00:35:42 UTC
453 +++ src/common/pa_stream.c
454 @@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentati
455 streamRepresentation->streamInfo.inputLatency = 0.;
456 streamRepresentation->streamInfo.outputLatency = 0.;
457 streamRepresentation->streamInfo.sampleRate = 0.;
459 + streamRepresentation->hostApiType = 0;
465 [FILE:319:patches/patch-src_common_pa__stream.h]
466 --- src/common/pa_stream.h.orig 2021-04-01 00:35:42 UTC
467 +++ src/common/pa_stream.h
468 @@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentatio
469 PaStreamFinishedCallback *streamFinishedCallback;
471 PaStreamInfo streamInfo;
472 + PaHostApiTypeId hostApiType;
473 } PaUtilStreamRepresentation;
478 [FILE:728:patches/patch-src_hostapi_oss_pa__unix__oss.c]
479 --- src/hostapi/oss/pa_unix_oss.c.orig 2021-04-01 00:35:42 UTC
480 +++ src/hostapi/oss/pa_unix_oss.c
481 @@ -2032,6 +2032,30 @@ error:
485 +const char *PaOSS_GetStreamInputDevice( PaStream* s )
487 + PaOssStream *stream = (PaOssStream*)s;
489 + if( stream->capture )
491 + return stream->capture->devName;
497 +const char *PaOSS_GetStreamOutputDevice( PaStream* s )
499 + PaOssStream *stream = (PaOssStream*)s;
501 + if( stream->playback )
503 + return stream->playback->devName;
510 /* TODO: Compute number of allocated bytes somewhere else, can we use ODELAY with capture */
511 static signed long GetStreamWriteAvailable( PaStream* s )
514 [FILE:1016:patches/patch-src_os_unix_pa__unix__hostapis.c]
515 $OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.2 2013/03/12 00:59:50 brad Exp $
517 Difference to OpenBSD patch: PA_USE_SNDIO has been moved before
518 PA_USE_OSS, so that portaudio prefers the sndio output.
520 --- src/os/unix/pa_unix_hostapis.c.orig 2021-04-01 00:35:42 UTC
521 +++ src/os/unix/pa_unix_hostapis.c
524 PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
525 PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
526 +PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
527 PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
528 /* Added for IRIX, Pieter, oct 2, 2003: */
529 PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
530 @@ -69,6 +70,10 @@ PaUtilHostApiInitializer *paHostApiIniti
532 #else /* __linux__ */
535 + PaSndio_Initialize,
543 [FILE:1787:files/pa_unix_oss.h]
544 #ifndef PA_UNIX_OSS_H
545 #define PA_UNIX_OSS_H
548 * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
549 * PortAudio Portable Real-Time Audio Library
550 * OSS-specific extensions
552 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
554 * Permission is hereby granted, free of charge, to any person obtaining
555 * a copy of this software and associated documentation files
556 * (the "Software"), to deal in the Software without restriction,
557 * including without limitation the rights to use, copy, modify, merge,
558 * publish, distribute, sublicense, and/or sell copies of the Software,
559 * and to permit persons to whom the Software is furnished to do so,
560 * subject to the following conditions:
562 * The above copyright notice and this permission notice shall be
563 * included in all copies or substantial portions of the Software.
565 * Any person wishing to distribute modifications to the Software is
566 * requested to send the modifications to the original developer so that
567 * they can be incorporated into the canonical version.
569 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
570 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
571 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
572 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
573 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
574 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
575 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
580 * OSS-specific PortAudio API extension header file.
587 const char *PaOSS_GetStreamInputDevice( PaStream *s );
589 const char *PaOSS_GetStreamOutputDevice( PaStream *s );