Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / test / data / third_party / kraken / tests / kraken-1.1 / audio-beat-detection.js
blob418d50ee6bfcaa85187365bfac431389736cb08f
1 var iterations = 1000;
3 var fft = fft = new FFT(frameBufferLength / channels, rate);
4 var bd = new BeatDetektor();
5 var kick_det = new BeatDetektor.modules.vis.BassKick();
6 var vu = new BeatDetektor.modules.vis.VU();
8 var calcBeat = function() {
9 var fb = getFramebuffer(), signal = DSP.getChannel(DSP.MIX, fb);
11 fft.forward(signal);
13 var timestamp = (new Date()).getTime();
14 bd.process(timestamp, fft.spectrum);
15 kick_det.process(bd);
16 vu.process(bd);
19 runTest(calcBeat, iterations);