Skip to content

Commit

Permalink
44.1 -> 48
Browse files Browse the repository at this point in the history
  • Loading branch information
anzz1 authored Mar 26, 2024
1 parent 046ba2b commit 148326b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion example/nes-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ function nes_init(canvas_id){
framebuffer_u32 = new Uint32Array(buffer);

// Setup audio.
var audio_ctx = new window.AudioContext();
var audio_ctx = new window.AudioContext({
latencyHint: "interactive",
sampleRate: 48000,
});
var script_processor = audio_ctx.createScriptProcessor(AUDIO_BUFFERING, 0, 2);
script_processor.onaudioprocess = audio_callback;
script_processor.connect(audio_ctx.destination);
Expand Down
2 changes: 1 addition & 1 deletion src/papu.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var PAPU = function (nes) {
this.initCounter = 2048;
this.channelEnableValue = null;

this.sampleRate = 44100; // 22050*2
this.sampleRate = 48000;

this.lengthLookup = null;
this.dmcFreqLookup = null;
Expand Down

0 comments on commit 148326b

Please sign in to comment.