-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed problems on high refresh rate monitors #335
Comments
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
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: