WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
79281
Use MathExtras round() in timeToSampleFrame
https://bugs.webkit.org/show_bug.cgi?id=79281
Summary
Use MathExtras round() in timeToSampleFrame
Raymond Toy
Reported
2012-02-22 14:50:22 PST
MathExtras.h includes a round() function. This should be used in the implementation of timeToSampleFrame in AudioUtilities.cpp. round() behaves better (no loss of precision) and works as is on Windows. (All webaudio layout tests pass with round.) This significantly simplifies the code and removes the ugly Windows-specific stuff.
Attachments
Patch
(2.71 KB, patch)
2012-02-23 14:44 PST
,
Raymond Toy
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Raymond Toy
Comment 1
2012-02-23 14:44:18 PST
Created
attachment 128560
[details]
Patch
Chris Rogers
Comment 2
2012-02-23 15:07:25 PST
Looks like a nice cleanup. This looks good, with the assumption that timeToSampleFrame() is *not* currently being called within any tight loops. That should be the case, but could you please sanity check?
Chris Rogers
Comment 3
2012-02-23 15:08:01 PST
(In reply to
comment #0
)
> MathExtras.h includes a round() function. This should be used in the implementation of timeToSampleFrame in AudioUtilities.cpp. round() behaves better (no loss of precision) and works as is on Windows. (All webaudio layout tests pass with round.)
I assume you've specifically run the layout tests on Windows?
> > This significantly simplifies the code and removes the ugly Windows-specific stuff.
Raymond Toy
Comment 4
2012-02-23 15:18:55 PST
(In reply to
comment #3
)
> (In reply to
comment #0
) > > MathExtras.h includes a round() function. This should be used in the implementation of timeToSampleFrame in AudioUtilities.cpp. round() behaves better (no loss of precision) and works as is on Windows. (All webaudio layout tests pass with round.) > > I assume you've specifically run the layout tests on Windows?
Layout tests pass on Windows. And I checked the code and timeToSampleFrame is not used in body of any tight loops.
WebKit Review Bot
Comment 5
2012-02-23 21:25:16 PST
Comment on
attachment 128560
[details]
Patch Clearing flags on attachment: 128560 Committed
r108726
: <
http://trac.webkit.org/changeset/108726
>
WebKit Review Bot
Comment 6
2012-02-23 21:25:21 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug