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:
Karl Tomlinson 2017-12-02 22:09:10 +13:00
Родитель edd7d1d82e
Коммит 42d2cadaa3
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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.