Repository navigation
Channel selection API #1359
Replies: 3 comments
|
A related feature I was wondering about, I work primarily with WASAPI, and thus don't know too much about the low level specifics of the other hosts and what they present under the hood, but I know that WASAPI has a channel mask which shows what the physical position of the speaker which that output represents, some drivers don't present this, but it is part of the official If cpal were to add some api for selecting channels inside the range, (eg instead of just choosing channels if not many other hosts than windows implement this, maybe it could be part of the explicit windows trait (like the plan for raw mode) mentioned in the v0.19 goals. (one last thing did pop to mind, if the driver doesnt support just [x..y], maybe cpal could automatically strip [0..x] from the callback, though idk if that escapes the scope of cpal) |
|
This would be a very useful feature when using big interfaces. They tend to present a lot of channels, especially if they have ADAT. Without channel selection you may end up capturing or outputting 18 channels, when all you care about is the SPDIF port that is on channels 9&10. |
Uh oh!
There was an error while loading. Please reload this page.
Currently, the stream creation API allows specifying how many channels to use, but not which channels to use.
nchannels always means0..n, so if e.g. you wanted a mono stream on the 3rd channel, you would have toTo solve this, there would need to be some way in the stream builder functions to specify which channels the stream should occupy. A (probably naive) solution would be to change
StreamConfig.channelstoVec<usize>, indicating the channel indices.All reactions