Skip to content

Commit

Permalink
Change to absolute thresholding
Browse files Browse the repository at this point in the history
Co-authored-by: terryzfeng <terryzfeng@users.noreply.github.com>
  • Loading branch information
Kizjkre and terryzfeng committed Jul 10, 2024
1 parent b29750b commit e7f0ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tests/playwright/pages/offline-sine.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<script defer type="module">
import { test, evaluate, assert, beCloseTo } from "./util/audit.js";
import { test, evaluate, assert } from './util/audit.js';

const sampleRate = 48000;
const renderLength = 1;
Expand All @@ -11,7 +11,7 @@

test(new Promise((resolve) => {
const offlineContext = new OfflineAudioContext(numberOfChannels,
renderLength * sampleRate, sampleRate);
renderLength * sampleRate, sampleRate);
const osc = new OscillatorNode(offlineContext, { frequency });
osc.connect(offlineContext.destination);

Expand All @@ -27,7 +27,7 @@

// compare bufferData samples to reference
for (let i = 0; i < bufferData.length; i++) {
assert(Math.abs(bufferData[i] - myRefData[i]) < 0.0001)
assert(Math.abs(bufferData[i] - myRefData[i]) < 0.0001);
}

// assert() returns true if all previous asserts passed
Expand Down

0 comments on commit e7f0ae5

Please sign in to comment.