Open chcunningham opened 3 years ago
I think it's easy enough to do, and will be very useful once AudioBuffer
will be able to store PCM of various bit-depth/format (https://github.com/WebAudio/web-audio-api-v2/issues/11).
is the set of sample formats a bounded set, or is it a set that will grow over time? If the latter, "any" is not possible to keep as a guarantee; if the former, it's a reasonable thing to require (and the spec should have text saying "this set will not grow").
It's a bounded set and already listed here: https://w3c.github.io/webcodecs/#enumdef-audiosampleformat
TPAC WebAudio folks were interested in to/from any bit depth and (de)interleave
As of #349, we mandate support for converting from ANY format to f32-planar. This allows for consistent integration with WebAudio. Chrome does not currently support conversions to other formats and will throw a NotSupportedError if requested.
But @padenot raised the point that we could mandate support for other conversions. I'm open to it. @padenot, do you think folks will find it useful?