dirkwhoffmann / vAmiga

vAmiga is a user-friendly Amiga 500, 1000, 2000 emulator for macOS
https://dirkwhoffmann.github.io/vAmiga
Other
293 stars 24 forks source link

Sound effects cause fps jitter #759

Closed dirkwhoffmann closed 1 year ago

dirkwhoffmann commented 1 year ago

While doing some experiments within the render loop, I've discovered that playing sound effects affects the fps rate. In the following example, a head step sound resulted in a skipped frame:

elapsed = 0.19998512498568743 fps = 50.0
elapsed = 0.19991566668613814 fps = 50.0
Canvas.252::updateTexture(): Frame sync mismatch (164 -> 166)
elapsed = 0.2399932083208114 fps = 42.0
elapsed = 0.20012429167400114 fps = 50.0
elapsed = 0.1999271666572895 fps = 50.0

Todo: Think about implementing something like an audio daemon running in a separate thread.

dirkwhoffmann commented 1 year ago

Fixed.