PortAudio - Portable Audio Library |
PortAudio is a cross platform audio I/O library proposed by Ross Bencina to the music-dsp mailing list. It provides a very simple API for recording and/or playing sound using a simple callback function. It is intended to promote the exchange of audio synthesis software between developers on different platforms. Example programs are included that synthesize sine waves and pink noise, perform fuzz distortion on a guitar, list available audio devices, etc.
This website is for implementations of the PortAudio library by Phil Burk of SoftSynth.com. Phil uses PortAudio as the basis for audio I/O in JSyn, a real-time synthesis API for Java and 'C'.
For more information, and for implementations on other platforms, please visit Ross Bencina's PortAudio Page.
Each version contains the source code for implementing PortAudio on all available platforms.
DX = DirectSound on Windows
WMME = Windows MultiMedia Interface
Mac = SoundManager on Macintosh
PortAudio V14 (DX, WMME, Mac) Beta
PortAudio V12 (DX and Mac) Beta
The PortAudio API is described fully in the "portaudio.h" include file.
Here is a short Tutorial on how to program using PortAudio.
Here is an Implementation Guide for people creating new versions of PortAudio.
V14 - 2/6/01V12 - 1/9/01
- Added implementation for Windows MultiMedia Extensions (WMME) by Ross and Phil
- Changed Pa_StopStream() so that it waits for the buffers to drain.
- Added Pa_AbortStream() that stops immediately without waiting.
- Added new test: patest_stop.c to test above two mods.
- Fixed Pa_StreamTime() so that it returns current play position instead of the write position. Added "patest_sync.c" to demo audio/video sync.
- Improved stability of Macintosh implementation. Added timeouts to prevent hangs.
- Added Pa_GetSampleSize( PaSampleFormat format );
- Changes some "int"s to "long"s so that PA works properly on Macintosh which often compiles using 16 bit ints.
- Added Implementation Guide
- Mac now scans for and queries all devices. But it does not yet support selecting any other than the default device.
- Blocking I/O calls renamed to separate them from the PortAudio API.
- Cleaned up indentation problems with tabs versus spaces.
- Now attempts to correct bogus sample rate info returned from DirectSound device queries.
If you find bugs in one of these implementations, or have suggestions, please e-mail them to Phil Burk.
If you make improvements to the library, please send them to the us so we can incorporate the improvements.
I also encourage you to join the PortAudio mail list maintained by Ross Bencina. See Ross' PortAudio Page for more info.
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: