You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's wrong way, you may need to implement a frame skip. But I'm not sure if requestanimationframe working faster than 60Hz, so the problem may be in wrong sound sample rate or small sound buffer size. Try to initialize audio context like this
var audio_ctx = new window.AudioContext({ sampleRate: nes.papu.sampleRate });
There are speed problems on high refresh rate monitors (in my case 144hz). On 60Hz monitor running just fine.
In example file "nes-embed.js" quick fix is to delete line 'nes.frame();' from onAnimationFrame()
function onAnimationFrame(){
window.requestAnimationFrame(onAnimationFrame);
image.data.set(framebuffer_u8);
canvas_ctx.putImageData(image, 0, 0);
//nes.frame();
}
I'm not an expert, can someone confirm it's the right way?
The text was updated successfully, but these errors were encountered: