Open chrisguttandin opened 1 month ago
Yeah, we talked about harmonizing implem and tests in an issue not too long ago, but I can't find it.
For decoding, it's not 100% required to provide the sample-rate and the channel count, sometimes it's possible to determine them from the bit stream. Sometimes it is required though.
For encoding, it's always required.
Right now a valid
AudioEncoderConfig
needs to have anumberOfChannels
and asampleRate
property greater than zero.https://w3c.github.io/webcodecs/#valid-audioencoderconfig
A similar check does not exist to validate an
AudioDecoderConfig
.https://w3c.github.io/webcodecs/#valid-audiodecoderconfig
Chrome seems to perform the same non-zero checks for an
AudioEncoderConfig
andAudioDecoderConfig
. But as far as I can tell they are not covered by a WPT.The checks for an
AudioEncoderConfig
were added here: https://github.com/w3c/webcodecs/pull/780.