[Webkit-unassigned] [Bug 78854] DelayNode has inaccurate delay

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 16:26:52 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78854


Raymond Toy <rtoy at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rtoy at chromium.org
         Depends on|                            |76919




--- Comment #4 from Raymond Toy <rtoy at chromium.org>  2012-02-23 16:26:52 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Yes, looks like DelayDSPKernel could use your AudioUtilities function
> > 
> > That will help, but I will need to take a closer look to see if that is enough.
> 
> Ok.  Applying timeToSampleFrame to
> 
>   double desiredDelayFrames = m_currentDelayTime * sampleRate;
> 
> helps with the case of a delay of 0.53 sec.  But consider the case where the delay is 0.005.  This is a delay of 220.5 samples.  Then desiredDelayFrames (after rounding) will be 221.  However, because delayTime comes from an AudioParam that only holds floats, the delayTime is actually 0.004999999888241291 (because 0.005 is converted to a single float which is the value given).  Then the delayTime * sampleRate = 220.49999507144094 which rounds to 220.  Thus, we're off by one.

The analysis here is not quite right.  AudioParam holds doubles.  But the IDL specifies floats, so the 0.005 (double) from Javascript gets converted to a float which is converted back to a (different) double and stored in AudioParam.

This issue will probably get fixed when bug 76919 is fixed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list