RtAudio - a C++ class which provides a common API for realtime audio input/output across Linux (native ALSA and OSS), SGI, and Windows operating systems.
By Gary P. Scavone, 2002.
This distribution of the Synthesis ToolKit in C++ (STK) contains the following:
doc: RtAudio documentation
tests: example RtAudio programs
OVERVIEW:
RtAudio is a C++ class which provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA and OSS), SGI, and Windows operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals:
- object oriented C++ design
- simple, common API across all supported platforms
- single independent header and source file for easy inclusion in programming projects (no libraries!)
- blocking functionality
- callback functionality
- extensive audio device parameter control
- audio device capability probing
- automatic internal conversion for data format, channel number compensation, de-interleaving, and byte-swapping
- control over multiple audio streams and devices with a single instance
RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Multiple streams can run at the same time and, when allowed by the underlying audio API, a single device can serve multiple streams.
The RtAudio API provides both blocking (synchronous) and callback (asyncronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events.
LEGAL AND ETHICAL:
This software was designed and created to be made publicly available for free, primarily for academic purposes, so if you use it, pass it on with this documentation, and for free.
If you make a million dollars with it, give me some. If you make compositions with it, put me in the program notes.
FURTHER READING:
For complete documentation on RtAudio, see the doc directory of the distribution or surf to http://www-ccrma.stanford.edu/~gary/rtaudio/.