ofSoundStream, pick only one input channel from a multichannel sound card

Hi,

I use OF 0.8.0 with OS X 10.9.

I have a multichannel sound card with several mics connected. I want to be able to pick one input channel at a time.


[notice ] sensor1 0.13597
[notice ] ofRtAudioSoundStream: device 5 MOTU: MOTU UltraLite mk3 Hybrid
[notice ] ofRtAudioSoundStream: ----* default ----*
[notice ] ofRtAudioSoundStream: maximum output channels 14
[notice ] ofRtAudioSoundStream: maximum input channels 14
[notice ] ofRtAudioSoundStream:

I setup ofSoundStream as,

ofSoundStreamSetup(2, 14, this, 44100, 256, 4);
sensor.listDevices();
sensor.setDeviceID(5);

My question is how to be able read just for input channel 3 for instance on the audioReceived callback?

Is input buffer treated as a circular buffer? so,
input[0] -> mic 0
input[1] -> mic 1

input[13]-> mic 13
input[14]-> mic 0
input[15]-> mic 1
… and so on

Thanks a lot!!

Well a circular buffer is something else. But yes the data is interleaved. So what you described is correct

Thanks Ahbee!!

It worked smoothly. yes, interleaving is the right word :slight_smile: