]> Repos - portaudio/summary
 
descriptionPortAudio portable cross-platform audio I/O library (fork)
last changeFri, 24 Jul 2026 20:55:10 +0000 (15:55 -0500)
readme

PortAudio - portable audio I/O library

PortAudio is a portable audio I/O library designed for cross-platform support of audio. It uses either a callback mechanism to request audio processing, or blocking read/write calls to buffer data between the native audio subsystem and the client. Audio can be processed in various formats, including 32 bit floating point, and will be converted to the native format internally.

Documentation:

For information on compiling programs with PortAudio, please see the tutorial at:

http://portaudio.com/docs/v19-doxydocs/tutorial_start.html

We have an active mailing list for user and developer discussions. Please feel free to join. See http://www.portaudio.com for details.

Important Files and Folders:

include/portaudio.h     = header file for PortAudio API. Specifies API. 
src/common/             = platform independent code, host independent 
                          code for all implementations.
src/os                  = os specific (but host api neutral) code
src/hostapi             = implementations for different host apis

Host API Implementations:

src/hostapi/alsa        = Advanced Linux Sound Architecture (ALSA)
src/hostapi/asihpi      = AudioScience HPI
src/hostapi/asio        = ASIO for Windows and Macintosh
src/hostapi/coreaudio   = Macintosh Core Audio for OS X
src/hostapi/dsound      = Windows Direct Sound
src/hostapi/jack        = JACK Audio Connection Kit
src/hostapi/oss         = Unix Open Sound System (OSS)
src/hostapi/wasapi      = Windows Vista WASAPI
src/hostapi/wdmks       = Windows WDM Kernel Streaming
src/hostapi/wmme        = Windows MultiMedia Extensions (MME)

Test Programs:

test/pa_fuzz.c         = guitar fuzz box
test/pa_devs.c         = print a list of available devices
test/pa_minlat.c       = determine minimum latency for your machine
test/paqa_devs.c       = self test that opens all devices
test/paqa_errs.c       = test error detection and reporting
test/patest_clip.c     = hear a sine wave clipped and unclipped
test/patest_dither.c   = hear effects of dithering (extremely subtle)
test/patest_pink.c     = fun with pink noise
test/patest_record.c   = record and playback some audio
test/patest_maxsines.c = how many sine waves can we play? Tests Pa_GetCPULoad().
test/patest_sine.c     = output a sine wave in a simple PA app
test/patest_sync.c     = test synchronization of audio and video
test/patest_wire.c     = pass input to output, wire simulator

NodeAudio

Build portaudio:

./configure and make

At the time of writing (MacOS 12.1) I initially received build errors (-WError) about unused variables, so I had to remove -WError flag from the build rules.

Anytime the build configuration changes, make sure to run (see PortAudio docs):

autoreconf -if

Use find command in usr/local/lib to see install state:

find /usr/local/lib -name "libport*" -maxdepth 1

The default build of PortAudio sets an absolute install path (usr/local/lib) which causes issues if you want to package the .dylib in a project. To fix this, use install_name_tool to rename the binary using a relative @loader_path:

install_name_tool -id "@loader_path/libportaudio.dylib" libportaudio.dylib

Ideally, this would be set in the build config settings of PortAudio, but I haven't figured out how to do that yet.

TODO: Sign on build Of course, any binary (e.g. libportaudio.dylib) must be signed before distribution.

shortlog
43 hours ago Andrew Gundersenupdate README refresh_devices
2022-03-10 Andrew GundersenUpdated README.md
2022-03-07 Andrew GundersenUpdating ReadMe
2021-08-20 Andrew GundersenPa_RefreshDevice functionality
2021-07-01 John MelasUnify all stringizing macros to new PA_STRINGIZE macro...
2021-06-23 John Melaspa_win_wmme.c: replace LPCTSTR with LPCWSTR (#597)
2021-06-09 Trent PiephoHave PaUtil_GetTime() use monotonic time on Unix (...
2021-06-09 John MelasUnify windows error processing into a single PaWinUtil_...
2021-06-09 Phil Burkalsa: init stream variable in pa_linux_alsa.c (#584)
2021-06-09 Phil Burktest: time out in patest_sine_time.c (#585)
2021-06-09 Phil Burkpa_mac_core.c: init streamLatency and others (#591)
2021-06-03 Trent PiephoAlsa: Use hires timestamps (#560)
2021-05-27 Ross BencinaAdd documentation indicating that Pa_ReadStream, Pa_Wri...
2021-05-27 Mirko RajkovacaAdded Pa_GetVersionInfo to portaudio.def (#574)
2021-05-13 MonkeybreadSoftwarealsa: Increase snprintf buffer size to fix warning...
2021-05-13 BeMME: fix comparison of IO buffer sizes in CalculateBuff...
...
tags
5 years ago v19.7.0-RC2 release candidate 2 with jack PipeW...
5 years ago v19.7.0
9 years ago pa_stable_v190600_20161030 released on Oct 30 2016
9 years ago svn/1415
12 years ago pa_stable_v19_20140130_r1919
14 years ago pa_stable_v19_20111121_r1788
15 years ago pa_stable_v19_20110326_r1647
18 years ago v19p-2008-03-20
18 years ago unknown-was-pateam
20 years ago v19-devel-pre-restructure
24 years ago V18
24 years ago initial
heads
43 hours ago refresh_devices
4 years ago master
4 years ago winrt
5 years ago fix-390-remove-lrintf-from-pa-converters
7 years ago alsa_uninitialized_dir_fixes
7 years ago ticket_263_alsa_uninitialized_var_2
7 years ago alsa_rename_grope_device_function
7 years ago ticket_263_alsa_uninitialized_var
7 years ago ticket_123
7 years ago sndio
7 years ago edechamps-remove-scons
7 years ago edechamps-cmake-instructions
7 years ago wasapiformat
7 years ago cmake_mingw_additions
7 years ago krokoziabla/win_package
8 years ago ticket_218
...