Is https://www.w3.org/TR/webcodecs/#dom-audioencoder-encode complete enough?
philn opened this issue · comments
WPT test https://github.com/web-platform-tests/wpt/blob/master/webcodecs/audio-encoder.https.any.js has channelNumberVariationTests
and sampleRateVariationTests
checking the input data matches the configuration of the encoder, but I see no mention of that in the spec.
Blink checks it, see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webcodecs/audio_encoder.cc;l=509
I'd tend to agree, and follow Chromium's behaviour here. This is what Firefox implements as well.