cpal
cpal copied to clipboard
How to handle zero channels in `SupportedStreamConfig`?
Recently I noticed it is possible for cpal to create a valid audio device through HostTrait::default_output_device even though the SupportedStreamConfig returned from DeviceTrait::default_output_config had a channel count of 0. Is this expected behavior? If so, what does a channel count of 0 mean?
I'm aware that a device may become invalid if they get disconnected. That is not the case in my example, this all happens during initialization code.
If any more info is required let me know!
Not an answer, but maybe related: https://github.com/RustAudio/cpal/pull/553 suggests to use "zero channels" to abstract over input/output/duplex.