-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
31 lines (20 loc) · 705 Bytes
/
main.cpp
File metadata and controls
31 lines (20 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include "RtAudio.h"
int main() {
RtAudio audio;
// Get the list of device IDs
std::vector< unsigned int > ids = audio.getDeviceIds();
if ( ids.size() == 0 ) {
std::cout << "No devices found." << std::endl;
return 0;
}
// Scan through devices for various capabilities
RtAudio::DeviceInfo info;
for ( unsigned int n=0; n<ids.size(); n++ ) {
info = audio.getDeviceInfo( ids[n] );
// Print, for example, the name and maximum number of output channels for each device
std::cout << "device name = " << info.name << std::endl;
std::cout << ": maximum output channels = " << info.outputChannels << std::endl;
}
return 0;
}