<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>223519</bug_id>
          
          <creation_ts>2021-03-19 09:38:10 -0700</creation_ts>
          <short_desc>decodeAudioData chops off beginning portion of audio file</short_desc>
          <delta_ts>2021-03-26 09:39:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Audio</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 10.15</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joe Hanley">joe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1741742</commentid>
    <comment_count>0</comment_count>
    <who name="Joe Hanley">joe</who>
    <bug_when>2021-03-19 09:38:10 -0700</bug_when>
    <thetext>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&apos;ll see Safari&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1744206</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-26 09:39:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/75889203&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>