From b0080e69d64ce69e21c8ce1b22b1bb7f888f1e58 Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Tue, 7 Aug 2007 14:52:05 +0000 Subject: Check in of new version 4.0.0 distribution (GS). --- tests/info.cpp | 78 ---------------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 tests/info.cpp (limited to 'tests/info.cpp') diff --git a/tests/info.cpp b/tests/info.cpp deleted file mode 100644 index 113efb0..0000000 --- a/tests/info.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************/ -/* - info.cpp - by Gary P. Scavone, 2001 - - Prints audio system/device info. -*/ -/******************************************/ - -#include "RtAudio.h" -#include - -int main(int argc, char *argv[]) -{ - RtAudio *audio = 0; - RtAudioDeviceInfo info; - try { - audio = new RtAudio(); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - int devices = audio->getDeviceCount(); - std::cout << "\nFound " << devices << " device(s) ...\n"; - - for (int i=1; i<=devices; i++) { - try { - info = audio->getDeviceInfo(i); - } - catch (RtError &error) { - error.printMessage(); - break; - } - - std::cout << "\nDevice Name = " << info.name << '\n'; - if (info.probed == false) - std::cout << "Probe Status = UNsuccessful\n"; - else { - std::cout << "Probe Status = Successful\n"; - std::cout << "Output Channels = " << info.outputChannels << '\n'; - std::cout << "Input Channels = " << info.inputChannels << '\n'; - std::cout << "Duplex Channels = " << info.duplexChannels << '\n'; - if (info.isDefault) std::cout << "This is the default device.\n"; - else std::cout << "This is NOT the default device.\n"; - if ( info.nativeFormats == 0 ) - std::cout << "No natively supported data formats(?)!"; - else { - std::cout << "Natively supported data formats:\n"; - if ( info.nativeFormats & RTAUDIO_SINT8 ) - std::cout << " 8-bit int\n"; - if ( info.nativeFormats & RTAUDIO_SINT16 ) - std::cout << " 16-bit int\n"; - if ( info.nativeFormats & RTAUDIO_SINT24 ) - std::cout << " 24-bit int\n"; - if ( info.nativeFormats & RTAUDIO_SINT32 ) - std::cout << " 32-bit int\n"; - if ( info.nativeFormats & RTAUDIO_FLOAT32 ) - std::cout << " 32-bit float\n"; - if ( info.nativeFormats & RTAUDIO_FLOAT64 ) - std::cout << " 64-bit float\n"; - } - if ( info.sampleRates.size() < 1 ) - std::cout << "No supported sample rates found!"; - else { - std::cout << "Supported sample rates = "; - for (unsigned int j=0; j