mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1131529 - Update the maximum FFT size in AnalyserNode to be 2^15. r=padenot
This commit is contained in:
parent
c674baae5b
commit
430745d9af
@ -120,9 +120,9 @@ AnalyserNode::WrapObject(JSContext* aCx)
|
||||
void
|
||||
AnalyserNode::SetFftSize(uint32_t aValue, ErrorResult& aRv)
|
||||
{
|
||||
// Disallow values that are not a power of 2 and outside the [32,2048] range
|
||||
// Disallow values that are not a power of 2 and outside the [32,32768] range
|
||||
if (aValue < 32 ||
|
||||
aValue > 2048 ||
|
||||
aValue > 32768 ||
|
||||
(aValue & (aValue - 1)) != 0) {
|
||||
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
|
||||
return;
|
||||
|
@ -52,7 +52,19 @@ addLoadEvent(function() {
|
||||
analyser.fftSize = 2049;
|
||||
}, DOMException.INDEX_SIZE_ERR);
|
||||
expectException(function() {
|
||||
analyser.fftSize = 4096;
|
||||
analyser.fftSize = 4097;
|
||||
}, DOMException.INDEX_SIZE_ERR);
|
||||
expectException(function() {
|
||||
analyser.fftSize = 8193;
|
||||
}, DOMException.INDEX_SIZE_ERR);
|
||||
expectException(function() {
|
||||
analyser.fftSize = 16385;
|
||||
}, DOMException.INDEX_SIZE_ERR);
|
||||
expectException(function() {
|
||||
analyser.fftSize = 32769;
|
||||
}, DOMException.INDEX_SIZE_ERR);
|
||||
expectException(function() {
|
||||
analyser.fftSize = 65536;
|
||||
}, DOMException.INDEX_SIZE_ERR);
|
||||
analyser.fftSize = 1024;
|
||||
is(analyser.frequencyBinCount, 512, "Correct new value for frequencyBinCount");
|
||||
|
Loading…
Reference in New Issue
Block a user