you might also want to check out Gray Scavone's RtAudio, which is C++
where PortAudio is C, and it provides both blocked and callback based
I/O.
"RtAudio is a C++ class which provides a common API (Application
Programming Interface) for realtime audio input/output across Linux
(native ALSA and OSS), Macintosh OS X, SGI, and Windows (DirectSound and
ASIO) operating systems. RtAudio significantly simplifies the process of
interacting with computer audio hardware."
http://ccrma-www.stanford.edu/~gary/rtaudio/
maarten