[hatari-devel] Higher precision when generating samples -> use nanosleep

David Savinkoff dsavnkff at telus.net
Fri Jan 28 05:29:50 CET 2011


Hi All,

This new patch supersedes my previous patches.

This patch addresses:
- Required boundary checking in vbl/sample-rate rounding.
  (prevents excessive samples from over running the buffer)
- abs(nFrameDelay) > 4*nFrameDuration in Main_WaitOnVbl().
  (prevents 16.384 second timer rollover wait when out of sync)
- Using the least common multiple (LCM) of 71 60 and 50 Hz.
- Continuous clock cycle correcting in Main_WaitOnVbl().
  (prevents excessive samples from accumulating)
And timing will not misbehave in 47 days or 2038 or ever.

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sound-sync-tip2.diff
Type: application/octet-stream
Size: 5759 bytes
Desc: not available
URL: <https://lists.berlios.de/pipermail/hatari-devel/attachments/20110127/773386bf/attachment.obj>


More information about the hatari-devel mailing list