/*! \page probe Probing Device Capabilities A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done. \code // audioprobe.cpp #include #include "RtAudio.h" int main() { RtAudio audio; // Determine the number of devices available unsigned int devices = audio.getDeviceCount(); // Scan through devices for various capabilities RtAudio::DeviceInfo info; for ( unsigned int i=0; i sampleRates; // Supported sample rates. unsigned int preferredSampleRate; // Preferred sample rate, eg. for WASAPI the system sample rate. RtAudioFormat nativeFormats; // Bit mask of supported data formats. }; \endcode The following data formats are defined and fully supported by RtAudio: \code typedef unsigned long RtAudioFormat; static const RtAudioFormat RTAUDIO_SINT8; // Signed 8-bit integer static const RtAudioFormat RTAUDIO_SINT16; // Signed 16-bit integer static const RtAudioFormat RTAUDIO_SINT24; // Signed 24-bit integer (lower 3 bytes of 32-bit signed integer.) static const RtAudioFormat RTAUDIO_SINT32; // Signed 32-bit integer static const RtAudioFormat RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0 static const RtAudioFormat RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0 \endcode The \c nativeFormats member of the RtAudio::DeviceInfo structure is a bit mask of the above formats which are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the \c probed member of the RtAudio::DeviceInfo structure is false, the remaining structure members are undefined and the device is probably unusable. Some audio devices may require a minimum channel value greater than one. RtAudio will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is NOT possible when the number of channels set by the user is greater than that supported by the device. It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. For this reason, RtAudio does not rely on the queried values when attempting to open a stream. */