Question: Multiple devices
Hi I have 3 input devices like so in my asound.conf I have worked out how to do a singular callback but puzzled how to do three. Do you aggregate the devices and then separate as tracks or can you have 3 device callbacks? If anyone has a code snippet for dummies please post.
pcm.cap1 {
type plug
slave {
pcm "plughw:2,0"
}
}
pcm.cap2 {
type plug
slave {
pcm "plughw:3,0"
}
}
pcm.cap3 {
type plug
slave {
pcm "plughw:4,0"
}
}
You can create 3 streams with 3 separate callbacks. But note that those callbacks are not necessarily synchronized between each other.
You should also be able to create an aggregate device in the ALSA config, where all channels are available in a single stream with a single callback function.
are there any ways to run two sound-cards without having to make hard configs in the OS? ie. doing it runtime to make it more cross-platform friendly.
seems like pulseaudio can do it
@raveslave
are there any ways to run two sound-cards without having to make hard configs in the OS?
Not in a platform-independent way.
You can try to create separate streams for separate sound cards. But apart from not being synchronized, this only works on some platforms and is not guaranteed to work by PortAudio.