-
Notifications
You must be signed in to change notification settings - Fork 476
Description
I've used Cpal for a while now and imho it excels at abstracting away all the details from the underlying audio API's. Mostly it picks the right default configuration for you, which is good. But sometimes it doesn't. For instance, what happens when you have multiple sound cards with a wide variety of sample rates? Another thing is sample format.. Sometimes it returns I16, when the underlying API definitely supports F32.. I'd like to make explicit choices here, as I'm sure would many others.
The enumerate example explains how to iterate through all possible configurations. But to actually match and choose one that's an entirely different thing. cpal::SupportedStreamConfigRange consists of private members, so how are we supposed to match a suitable configuration? More examples would definitely be welcome! Thanks in advance.