scope
This commit is contained in:
parent
b2ad274280
commit
c60f9d8d9d
1 changed files with 7 additions and 6 deletions
|
|
@ -50,13 +50,14 @@ function audioFingerprint() {
|
||||||
compressor.connect(context.destination);
|
compressor.connect(context.destination);
|
||||||
oscillator.start()
|
oscillator.start()
|
||||||
context.oncomplete = event => {
|
context.oncomplete = event => {
|
||||||
const samples = event.renderedBuffer.getChannelData(0)};
|
const samples = event.renderedBuffer.getChannelData(0);
|
||||||
context.startRendering();
|
|
||||||
let hash = 0;
|
let hash = 0;
|
||||||
for (let i = 0; i < samples.length; ++i) {
|
for (let i = 0; i < samples.length; ++i) {
|
||||||
hash += Math.abs(samples[i]);
|
hash += Math.abs(samples[i]);
|
||||||
}
|
}
|
||||||
return hash;
|
return hash;
|
||||||
|
};
|
||||||
|
context.startRendering();
|
||||||
}
|
}
|
||||||
|
|
||||||
function canvasFingerprint() {
|
function canvasFingerprint() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue