data = {
const time = new Uint8Array(analyser.fftSize);
const frequency = new Uint8Array(analyser.frequencyBinCount);
let t0 = Date.now();
while (true) {
analyser.getByteTimeDomainData(time);
analyser.getByteFrequencyData(frequency);
const now = Date.now();
yield { time, frequency, fps: 1000 / (now - t0) };
t0 = now;
}
}