1 /******************************************/
4 by Gary P. Scavone, 2001
6 Prints audio system/device info.
8 /******************************************/
13 int main(int argc, char *argv[])
16 RtAudio::RTAUDIO_DEVICE my_info;
18 audio = new RtAudio();
20 catch (RtAudioError &m) {
25 int devices = audio->getDeviceCount();
26 cout << "\nFound " << devices << " devices ...\n";
28 for (int i=0; i<devices; i++) {
30 audio->getDeviceInfo(i, &my_info);
32 catch (RtAudioError &m) {
37 cout << "\nname = " << my_info.name << '\n';
38 if (my_info.probed == true)
39 cout << "probe successful\n";
41 cout << "probe unsuccessful\n";
42 cout << "maxOutputChans = " << my_info.maxOutputChannels << '\n';
43 cout << "minOutputChans = " << my_info.minOutputChannels << '\n';
44 cout << "maxInputChans = " << my_info.maxInputChannels << '\n';
45 cout << "minInputChans = " << my_info.minInputChannels << '\n';
46 cout << "maxDuplexChans = " << my_info.maxDuplexChannels << '\n';
47 cout << "minDuplexChans = " << my_info.minDuplexChannels << '\n';
48 if (my_info.hasDuplexSupport)
49 cout << "duplex support = true\n";
51 cout << "duplex support = false\n";
52 cout << "format = " << my_info.nativeFormats << '\n';
53 if (my_info.nSampleRates == -1)
54 cout << "min_srate = " << my_info.sampleRates[0] << ", max_srate = " << my_info.sampleRates[1] << '\n';
56 cout << "sample rates = ";
57 for (int j=0; j<my_info.nSampleRates; j++)
58 cout << my_info.sampleRates[j] << " ";