Skip to content

Choosing a suitable output configuration.. #513

@pietervandermeer

Description

@pietervandermeer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions