Vorbis AudioEncoder ignores its input and encodes to silence or garbage
Categories
(Core :: Web Audio, defect)
Tracking
()
People
(Reporter: dpayr, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/158.0.0.0 Safari/537.36
Steps to reproduce
Repro here: https://gilded-bavarois-be2a55.netlify.app/
Check the page source for the code.
Actual results
A Vorbis AudioEncoder accepts its configuration (and isConfigSupported() reports it as supported), but discards the audio it is given: the output chunks are only 10 to 14 bytes each and decode to silence. This happens with f32, f32-planar and s16 input. With u8 input, the output instead decodes to loud noise unrelated to the input.
Encoding 0.5 s of a 440 Hz sine wave (mono, 48 kHz, amplitude 0.5, 128 kbps) and decoding the resulting chunks again gives 25 chunks totaling 346 bytes, with a decoded RMS of 0.000.
The chunk timing is off too: every chunk has a duration of 1333 µs (64 frames), even though consecutive chunks are mostly 21333 µs (1024 frames) apart, and the first two chunks both have timestamp 0.
Expected results
The chunks carry the encoded audio and decode back to the sine wave, with an RMS of about 0.35.
Alternatively, if Firefox can't support encoding Vorbis, it should not be reported as supported.
Comment 1•15 hours ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Web Audio' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Description
•