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:3617: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
184 open_default_stream.html
186 pa__asio_8h_source.html
188 pa__devs_8c_source.html
190 pa__fuzz_8c_source.html
192 pa__jack_8h_source.html
193 pa__linux__alsa_8h.html
194 pa__linux__alsa_8h_source.html
195 pa__mac__core_8h.html
196 pa__mac__core_8h_source.html
198 pa__win__ds_8h_source.html
199 pa__win__wasapi_8h.html
200 pa__win__wasapi_8h_source.html
201 pa__win__waveformat_8h.html
202 pa__win__waveformat_8h_source.html
203 pa__win__wdmks_8h.html
204 pa__win__wdmks_8h_source.html
205 pa__win__wmme_8h.html
206 pa__win__wmme_8h_source.html
207 paex__mono__asio__channel__select_8c.html
208 paex__mono__asio__channel__select_8c_source.html
209 paex__ocean__shore_8c.html
210 paex__ocean__shore_8c_source.html
212 paex__pink_8c_source.html
213 paex__read__write__wire_8c.html
214 paex__read__write__wire_8c_source.html
216 paex__record_8c_source.html
217 paex__record__file_8c.html
218 paex__record__file_8c_source.html
220 paex__saw_8c_source.html
222 paex__sine_8c_source.html
223 paex__sine__c_09_09_8cpp_source.html
224 paex__wmme__ac3_8c.html
225 paex__wmme__ac3_8c_source.html
226 paex__wmme__surround_8c.html
227 paex__wmme__surround_8c_source.html
228 paex__write__sine_8c.html
229 paex__write__sine_8c_source.html
230 paex__write__sine__nonint_8c.html
231 paex__write__sine__nonint_8c_source.html
233 portaudio-external-architecture-diagram.png
235 portaudio_8h_source.html
236 querying_devices.html
239 start_stop_abort.html
242 structPaAlsaStreamInfo.html
243 structPaAsioStreamInfo.html
244 structPaDeviceInfo.html
245 structPaHostApiInfo.html
246 structPaHostErrorInfo.html
247 structPaMacCoreStreamInfo.html
248 structPaStreamCallbackTimeInfo.html
249 structPaStreamInfo.html
250 structPaStreamParameters.html
251 structPaVersionInfo.html
252 structPaWDMKSDirectionSpecificStreamInfo.html
253 structPaWDMKSSpecificStreamInfo.html
254 structPaWasapiJackDescription.html
255 structPaWasapiStreamInfo.html
256 structPaWinDirectSoundStreamInfo.html
257 structPaWinMmeDeviceAndChannelCount.html
258 structPaWinMmeStreamInfo.html
259 structPaWinWDMKSDeviceInfo.html
260 structPaWinWDMKSInfo.html
261 structPaWinWaveFormat.html
263 structpaTestData.html
275 terminating_portaudio.html
277 utility_functions.html
278 writing_a_callback.html
281 [FILE:321:manifests/plist.examples]
282 share/examples/portaudio/
286 paex_mono_asio_channel_select.c
289 paex_read_write_wire.c
298 paex_write_sine_nonint.c
302 [FILE:250:patches/patch-Makefile.in]
303 --- Makefile.in.orig 2021-04-01 00:35:41 UTC
305 @@ -146,6 +146,7 @@ SRC_DIRS = \
309 + src/hostapi/sndio \
310 src/hostapi/skeleton \
315 [FILE:1727:patches/patch-configure.in]
316 $OpenBSD: patch-configure_in,v 1.4 2014/09/13 04:56:28 bentley Exp $
317 --- configure.in.orig 2021-04-01 00:35:42 UTC
319 @@ -33,6 +33,10 @@ AC_ARG_WITH(alsa,
320 AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
321 [with_alsa=$withval])
324 + AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
325 + [with_sndio=$withval])
328 AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
329 [with_jack=$withval])
330 @@ -129,6 +133,10 @@ have_alsa=no
331 if test "x$with_alsa" != "xno"; then
332 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
335 +if test "x$with_sndio" != "xno"; then
336 + AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
339 if test "x$with_asihpi" != "xno"; then
340 AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
341 @@ -401,6 +409,13 @@ case "${host_os}" in
342 AC_DEFINE(PA_USE_ALSA,1)
345 + if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
346 + DLL_LIBS="$DLL_LIBS -lsndio"
347 + LIBS="$LIBS -lsndio"
348 + OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
349 + AC_DEFINE(PA_USE_SNDIO,1)
352 if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
353 DLL_LIBS="$DLL_LIBS $JACK_LIBS"
354 CFLAGS="$CFLAGS $JACK_CFLAGS"
355 @@ -504,6 +519,7 @@ case "$target_os" in
359 + Sndio ....................... $have_sndio
360 OSS ......................... $have_oss
361 JACK ........................ $have_jack
365 [FILE:836:patches/patch-include_portaudio.h]
366 $OpenBSD: patch-include_portaudio_h,v 1.2 2013/03/12 00:59:50 brad Exp $
367 --- include/portaudio.h.orig 2021-04-01 00:35:42 UTC
368 +++ include/portaudio.h
369 @@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
373 - paAudioScienceHPI=14
374 + paAudioScienceHPI=14,
379 @@ -1200,6 +1201,15 @@ signed long Pa_GetStreamReadAvailable( P
380 signed long Pa_GetStreamWriteAvailable( PaStream* stream );
383 +/** Retrieve the host type handling an open stream.
385 + @return Returns a non-negative value representing the host API type
386 + handling an open stream or, a PaErrorCode (which are always negative)
387 + if PortAudio is not initialized or an error is encountered.
389 +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
392 /* Miscellaneous utilities */
397 [FILE:1404:patches/patch-src_common_pa__front.c]
398 --- src/common/pa_front.c.orig 2021-04-01 00:35:42 UTC
399 +++ src/common/pa_front.c
400 @@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream
401 hostApiInputParametersPtr, hostApiOutputParametersPtr,
402 sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
404 - if( result == paNoError )
405 + if( result == paNoError ) {
406 AddOpenStream( *stream );
407 + PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
411 PA_LOGAPI(("Pa_OpenStream returned:\n" ));
412 @@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable(
416 +PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
418 + PaError error = PaUtil_ValidateStreamPointer( stream );
419 + PaHostApiTypeId result;
421 +#ifdef PA_LOG_API_CALLS
422 + PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
423 + PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
426 + if( error == paNoError )
428 + result = PA_STREAM_REP(stream)->hostApiType;
432 + result = (PaHostApiTypeId) error;
435 +#ifdef PA_LOG_API_CALLS
436 + PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
437 + PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
443 PaError Pa_GetSampleSize( PaSampleFormat format )
447 [FILE:365:patches/patch-src_common_pa__stream.c]
448 --- src/common/pa_stream.c.orig 2021-04-01 00:35:42 UTC
449 +++ src/common/pa_stream.c
450 @@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentati
451 streamRepresentation->streamInfo.inputLatency = 0.;
452 streamRepresentation->streamInfo.outputLatency = 0.;
453 streamRepresentation->streamInfo.sampleRate = 0.;
455 + streamRepresentation->hostApiType = 0;
461 [FILE:319:patches/patch-src_common_pa__stream.h]
462 --- src/common/pa_stream.h.orig 2021-04-01 00:35:42 UTC
463 +++ src/common/pa_stream.h
464 @@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentatio
465 PaStreamFinishedCallback *streamFinishedCallback;
467 PaStreamInfo streamInfo;
468 + PaHostApiTypeId hostApiType;
469 } PaUtilStreamRepresentation;
474 [FILE:728:patches/patch-src_hostapi_oss_pa__unix__oss.c]
475 --- src/hostapi/oss/pa_unix_oss.c.orig 2021-04-01 00:35:42 UTC
476 +++ src/hostapi/oss/pa_unix_oss.c
477 @@ -2032,6 +2032,30 @@ error:
481 +const char *PaOSS_GetStreamInputDevice( PaStream* s )
483 + PaOssStream *stream = (PaOssStream*)s;
485 + if( stream->capture )
487 + return stream->capture->devName;
493 +const char *PaOSS_GetStreamOutputDevice( PaStream* s )
495 + PaOssStream *stream = (PaOssStream*)s;
497 + if( stream->playback )
499 + return stream->playback->devName;
506 /* TODO: Compute number of allocated bytes somewhere else, can we use ODELAY with capture */
507 static signed long GetStreamWriteAvailable( PaStream* s )
510 [FILE:1016:patches/patch-src_os_unix_pa__unix__hostapis.c]
511 $OpenBSD: patch-src_os_unix_pa_unix_hostapis_c,v 1.2 2013/03/12 00:59:50 brad Exp $
513 Difference to OpenBSD patch: PA_USE_SNDIO has been moved before
514 PA_USE_OSS, so that portaudio prefers the sndio output.
516 --- src/os/unix/pa_unix_hostapis.c.orig 2021-04-01 00:35:42 UTC
517 +++ src/os/unix/pa_unix_hostapis.c
520 PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
521 PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
522 +PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
523 PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
524 /* Added for IRIX, Pieter, oct 2, 2003: */
525 PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
526 @@ -69,6 +70,10 @@ PaUtilHostApiInitializer *paHostApiIniti
528 #else /* __linux__ */
531 + PaSndio_Initialize,
539 [FILE:1787:files/pa_unix_oss.h]
540 #ifndef PA_UNIX_OSS_H
541 #define PA_UNIX_OSS_H
544 * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
545 * PortAudio Portable Real-Time Audio Library
546 * OSS-specific extensions
548 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
550 * Permission is hereby granted, free of charge, to any person obtaining
551 * a copy of this software and associated documentation files
552 * (the "Software"), to deal in the Software without restriction,
553 * including without limitation the rights to use, copy, modify, merge,
554 * publish, distribute, sublicense, and/or sell copies of the Software,
555 * and to permit persons to whom the Software is furnished to do so,
556 * subject to the following conditions:
558 * The above copyright notice and this permission notice shall be
559 * included in all copies or substantial portions of the Software.
561 * Any person wishing to distribute modifications to the Software is
562 * requested to send the modifications to the original developer so that
563 * they can be incorporated into the canonical version.
565 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
566 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
567 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
568 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
569 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
570 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
571 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
576 * OSS-specific PortAudio API extension header file.
583 const char *PaOSS_GetStreamInputDevice( PaStream *s );
585 const char *PaOSS_GetStreamOutputDevice( PaStream *s );