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();
25 int devices = audio->getDeviceCount();
26 cout << "\nFound " << devices << " devices ...\n";
28 for (int i=1; i<=devices; i++) {
30 audio->getDeviceInfo(i, &my_info);
37 cout << "\nname = " << my_info.name << '\n';
38 if (my_info.probed == true) {
39 cout << "probe successful\n";
40 cout << "maxOutputChans = " << my_info.maxOutputChannels << '\n';
41 cout << "minOutputChans = " << my_info.minOutputChannels << '\n';
42 cout << "maxInputChans = " << my_info.maxInputChannels << '\n';
43 cout << "minInputChans = " << my_info.minInputChannels << '\n';
44 cout << "maxDuplexChans = " << my_info.maxDuplexChannels << '\n';
45 cout << "minDuplexChans = " << my_info.minDuplexChannels << '\n';
46 if (my_info.hasDuplexSupport) cout << "duplex support = true\n";
47 else cout << "duplex support = false\n";
48 if (my_info.isDefault) cout << "is default device = true\n";
49 else cout << "is default device = false\n";
50 cout << "format = " << my_info.nativeFormats << '\n';
51 if (my_info.nSampleRates == -1) {
52 cout << "min_srate = " << my_info.sampleRates[0];
53 cout << ", 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] << " ";
63 cout << "probe unsuccessful\n";