Open chcunningham opened 3 years ago
As mentioned during the call, this is rather uncommon, but is apparently possible in some framework. Authors can of course resample themselves (using the Web Audio API or their WASM DSP).
Triage note: marking 'extension' as resampling would be offered via some new method or API (e.g. AudioData.resampleTo()
or interface AudioResampler{ ...}
).
Agreed.
I'll just add in passing that the first API proposal can't work because any resampler except linear resampling (which has unacceptable audio quality) is stateful.
IMHO, we don't want this since it's a high level concept at odds with the low level nature of WebCodecs.
Instead authors should use an OfflineAudioContext to handle resampling or channel mixing. You generally do not want to resample a single frame of audio since the kernel preserves state across frames as it moves over the resampling window.
Request from audio industry pros. Could even be done per-decode() to create ramping effects. Leverage in-decoder resampling where available.