Bug 223519 - decodeAudioData chops off beginning portion of audio file
Summary: decodeAudioData chops off beginning portion of audio file
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 14
Hardware: Mac (Intel) macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-19 09:38 PDT by Joe Hanley
Modified: 2021-03-26 09:39 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Hanley 2021-03-19 09:38:10 PDT
In Safari, decodeAudioData is returning a buffer that is missing the first ~3000 samples. For short audio files (like drum sounds for example) this can have a significant impact on the sound.

To recreate this bug, do the following in both Chrome and Safari:

Go to https://jsfiddle.net/hanley101/kbjh8sz7/17/

Load this file: https://www.dropbox.com/s/48yub3sfa2caw7x/TomLo_Ac.mp3?dl=0

Hit Decode to see the buffer length and duration. Compare between Chrome and Safari and you'll see Safari's buffer length and duration are smaller.

NOTE: The jsfiddle should also play the file when you hit decode, though this is only working in Chrome, not sure why.
Comment 1 Radar WebKit Bug Importer 2021-03-26 09:39:13 PDT
<rdar://problem/75889203>