зеркало из https://github.com/mozilla/gecko-dev.git
bug 1339889 don't use AnalyserNode smoothing when testing signal r=padenot
MozReview-Commit-ID: 23rgwLULjID --HG-- extra : rebase_source : 62812a611652b4fd530c34f15f8bddabba1bd7bd
This commit is contained in:
Родитель
edd7d1d82e
Коммит
42d2cadaa3
|
@ -78,6 +78,10 @@ audioElement.loop = true;
|
|||
var ac = new AudioContext();
|
||||
var mediaElementSource = ac.createMediaElementSource(audioElement);
|
||||
var an = ac.createAnalyser();
|
||||
// Use no smoothing as this would just average with previous
|
||||
// getFloatFrequencyData() calls. Non-seamless looping would introduce noise,
|
||||
// and smoothing would spread this into calls after the loop point.
|
||||
an.smoothingTimeConstant = 0;
|
||||
frequencyArray = new Float32Array(an.frequencyBinCount);
|
||||
|
||||
// Uncomment this to check what the analyser is doing.
|
||||
|
|
Загрузка…
Ссылка в новой задаче