I am trying to write a C++ program which plays real-time processed audio. I have decided to use RtAudio but cannot make the test programs play audio.
I am using Mac OS X, so I compiled with ./configure --with-core and make. After compiling the files in the test directory, I ran ./audioprobe to return this list.
Compiled APIs:
OS-X Core Audio
Current API: OS-X Core Audio
Found 3 device(s) ...
Device Name = Apple Inc.: Built-in Microphone
Probe Status = Successful
Output Channels = 0
Input Channels = 2
Duplex Channels = 0
This is NOT the default output device.
This is NOT the default input device.
Natively supported data formats:
32-bit float
Supported sample rates = 44100 48000 88200 96000
Device Name = Apple Inc.: Built-in Input
Probe Status = Successful
Output Channels = 0
Input Channels = 2
Duplex Channels = 0
This is NOT the default output device.
This is the default input device.
Natively supported data formats:
32-bit float
Supported sample rates = 44100 48000 88200 96000
Device Name = Apple Inc.: Built-in Output
Probe Status = Successful
Output Channels = 2
Input Channels = 0
Duplex Channels = 0
This is the default output device.
This is NOT the default input device.
Natively supported data formats:
32-bit float
Supported sample rates = 44100 48000 88200 96000
Since the Built-in Output device is index 2, I then ran ./playsaw 2 44100 2, but an error occurred:
RtApiCore::probeDeviceOpen: system error (kAudioHardwareUnknownPropertyError)
getting stream format for device (2).
How can this be fixed?
Are you on Lion (10.7)? I am seeing the same problem, on older systems (10.6.x) RtAudio work fine for me.
Perhaps you can downgrade to RtAudio 4.0.6, this worked for me on Lion, but there’s still a bug lurking around with device names which got fixed in 4.0.8.