I currently have 2 audio codecs suitable for input and I want to record from them at the same time and not sequentially.
This is how I see my devices:
import sounddevice as sd
sd.querydevices()
output:
< 0 DisplayPort, Core Audio (0 in, 2 out)
1 USB AUDIO CODEC, Core Audio (0 in, 2 out)
2 USB AUDIO CODEC, Core Audio (2 in, 0 out)
3 USB AUDIO CODEC, Core Audio (0 in, 2 out)
> 4 USB AUDIO CODEC, Core Audio (2 in, 0 out)
5 USB Advanced Audio Device, Core Audio (0 in, 2 out)
6 USB Advanced Audio Device, Core Audio (1 in, 0 out)
7 MacBook Pro Microphone, Core Audio (1 in, 0 out)
8 MacBook Pro Speakers, Core Audio (0 in, 2 out)
Currently I can only record from one device at a time. The input audio devices above are 2 and 4, with 4 selected as the default and noted by the carat '>'.
Now I know how to record on the default channel for 4 seconds:
recording = sd.rec(int(4 * 44100), samplerate=44100, channels=1)
I also know how to change the default channel, for example setting it to 2:
sd.default.device = [2,0]
What I would like to do is simultaneously record from channels [4,0] and [2,0] at the same time.