PortAudio provides functions to enumerate available Devices and to query for Device capabilities. Devices have names and certain capabilities such as supported sample rates and the number of supported input and output channels. Sometimes it's useful to know which Host APIs you're dealing with, but it is easy to use PortAudio without ever interacting directly with the Host API abstraction.ĭevices represent individual hardware audio interfaces or audio ports on the host platform. The diagram in the previous section shows many of the supported native APIs.
Some examples of Host APIs are Core Audio on Mac OS, WMME and DirectSound on Windows and OSS and ALSA on Linux.
Host APIs represent platform-specific native audio APIs. The PortAudio processing model includes three main abstractions: Host APIs, audio Devices and audio Streams. Key abstractions: Host APIs, Devices and Streams Another example is that the ASIO SDK only allows one device to be open at a time, so PortAudio/ASIO doesn't currently support opening multiple ASIO devices simultaneously. For example, PortAudio doesn't provide sample rate conversion if you request a sample rate that is not supported by the native audio API. There are cases where PortAudio is limited by the capabilities of the underlying native audio API. However, it doesn't always provide totally uniform functionality. PortAudio provides a uniform interface to native audio APIs.