diff --git a/jsnes/src/sample.js b/jsnes/src/sample.js index fbdd328..a1b0886 100644 --- a/jsnes/src/sample.js +++ b/jsnes/src/sample.js @@ -28,7 +28,7 @@ Sample.prototype = { return copy; }, get frequency() { - return this.sampleRate / this.increment; + return Math.round(this.sampleRate / this.increment); }, set frequency(toneHz) { this.increment = this.sampleRate / toneHz; diff --git a/samples/QUACK.WAV b/samples/QUACK.WAV new file mode 100644 index 0000000..6458622 Binary files /dev/null and b/samples/QUACK.WAV differ diff --git a/src/App.svelte b/src/App.svelte index 95a5e04..ddd84aa 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,6 +1,7 @@