Spectro things

Putting Spectrogram more towards the left makes sense to me, that way from left to right it's current detections -----> past detections.
This commit is contained in:
ehpersonal38
2022-05-24 12:59:27 -04:00
parent f9cc6b6aa5
commit ddfec7222c
2 changed files with 20 additions and 9 deletions
+17 -6
View File
@@ -36,13 +36,19 @@ window.onload = function(){
document.getElementById('player').remove();
player = audioelement;
} else {
player = document.getElementById('player');
}
player.play();
if (started) return;
if (started) return;
started = true;
initialize();
} else {
player = document.getElementById('player');
player.oncanplay = function() {
if (started) return;
started = true;
initialize();
};
}
player.play();
}
};
@@ -95,7 +101,12 @@ function initialize() {
ANALYSER.fftSize = 2048;
process();
try{
process();
} catch(e) {
window.top.location.reload();
}
function process() {
const SOURCE = ACTX.createMediaElementSource(player);