This commit is contained in:
randogoth 2023-05-21 16:42:15 +03:00
parent b2ad274280
commit c60f9d8d9d

View file

@ -50,13 +50,14 @@ function audioFingerprint() {
compressor.connect(context.destination);
oscillator.start()
context.oncomplete = event => {
const samples = event.renderedBuffer.getChannelData(0)};
context.startRendering();
const samples = event.renderedBuffer.getChannelData(0);
let hash = 0;
for (let i = 0; i < samples.length; ++i) {
hash += Math.abs(samples[i]);
}
return hash;
};
context.startRendering();
}
function canvasFingerprint() {