Tutorial :Use 2 sound cards



Question:

I need to play a sound with sound card "A", while recording another sound using sound card "B". I know how to play or record a sound (using PyAudio), but I don't know how to choose which sound card to use for it. I have the impression that PyAudio doesn't allow choosing the sound card, but I might be wrong (I'm a beginner at Python).


Solution:1

It appears that PortAudio, the C package that PyAudio wraps, has the ability to choose a sound card.

PortAudio has the parameters / methods PaDeviceIndex, Pa_getdeviceCount(), and PaUseHostAPISpecificDeviceSpecification.

For some reason, PyAudio does not wrap those parameters / methods.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »