-
Notifications
You must be signed in to change notification settings - Fork 476
Description
CPAL's current approach to querying capabilities is the Device::supported_formats method, which aims to enumerate all possible formats supported by the device. Providing an exhaustive list of formats in this manner is not very scalable, especially as we anticipate adding support for alternate sample formats, audio data layouts (#367) and buffer sizes in the future.
#203 proposes a slimmer API that allows querying individual formats, though this is equally unscalable for users wishing to determine the full set of capabilities of a device.
I wonder if we can look to Vulkan's device capabilities API for inspiration here? Edit: I guess Vulkan has the advantage of co-ordinating with driver implementers on a standard for this, whereas we are restricted to working with what host's currently provide access to.
A useful first step might be to consolidate all our existing knowledge of how capabilities are exposed by each Host so that we can get a clearer idea of what we have to work with. E.g. are the same sample rates supported for all sample formats across all hosts? Are supported sample rates always described in continuous ranges? Or do some hosts provide supported sample rates only as a set of discrete integers?