Bug 180040 - Web Audio's AnalyserNode.fftSize cannot be greater than 2048 in Safari; spec says it can be up to 32768
Summary: Web Audio's AnalyserNode.fftSize cannot be greater than 2048 in Safari; spec ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 11
Hardware: Mac macOS 10.13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-27 09:41 PST by Noah Chase
Modified: 2017-11-28 10:52 PST (History)
5 users (show)

See Also:


Attachments
Patch (4.37 KB, patch)
2017-11-27 15:45 PST, Noah Chase
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Chase 2017-11-27 09:41:50 PST
Summary: the Web Audio spec says that an AnalyzerNode's `fftSize` "must be a power of two in the range 32 to 32768, otherwise an IndexSizeError exception must be thrown." – but in Safari, the `IndexSizeError` exception is thrown for values over 2048 (e.g. the next reasonable value, which is 4096).

Steps to Reproduce:

Try to assign your AnalyserNode's fftSize to 4096 

Expected Results:

Assignment should work

Actual Results:

`IndexSizeError` is thrown

Version/Build:

13604.3.5 and 13605.1.13.2
Comment 1 Noah Chase 2017-11-27 15:45:42 PST
Created attachment 327702 [details]
Patch
Comment 2 Alex Christensen 2017-11-27 21:13:47 PST
Could you include a link to the relevant spec?
Are there tests that check the actual output of these larger FFTs?
How do other browsers behave?  Do they follow the spec?
Comment 3 Noah Chase 2017-11-28 05:27:00 PST
1. Link to the place in the spec where this is described: https://www.w3.org/TR/webaudio/#widl-AnalyserNode-fftSize
2. I only found tests that either reject an fftSize (if it is out of range or something other than a power of two) or allow it – those tests have been updated here.
3. Other browsers do indeed behave and follow the spec (I have tested Firefox and Chrome, but nothing else).
Comment 4 WebKit Commit Bot 2017-11-28 10:51:03 PST
Comment on attachment 327702 [details]
Patch

Clearing flags on attachment: 327702

Committed r225226: <https://trac.webkit.org/changeset/225226>
Comment 5 WebKit Commit Bot 2017-11-28 10:51:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-11-28 10:52:35 PST
<rdar://problem/35726784>