Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select input channel #25

Open
maxiconil opened this issue Apr 9, 2019 · 1 comment
Open

Select input channel #25

maxiconil opened this issue Apr 9, 2019 · 1 comment

Comments

@maxiconil
Copy link

Hi, I'm using a multi input sound card (16 input channels). How can I select the channel I want to record? I mean, how can I set the input source of a stream?

Thanks

@scriptorian
Copy link

Hi.

The simple answer is that the underlying portaudio library captures all channels from a device, interleaved according to the selected sampleFormat option. If you wish to extract just one channel you will have to write some code to pick that channel's data from the interleaved stream that is returned.

Since the portaudio library offers a non-interleaved flag it would be possible to extend the naudiodon wrapper to offer some form of channel selection. The general case for this should probably involve a fair bit of work to support selecting and re-interleaving channels to the variety of common channel formats to make the required stream. I also note that the portaudio documentation warns that while it may be possible to open multiple streams on a device this is implementation defined.

Thanks, and good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants