[hatari-devel] More precise VBL delays
Nicolas Pomarède
npomarede at corp.free.fr
Sun Feb 6 23:12:38 CET 2011
Le 06/02/2011 21:43, Eero Tamminen a écrit :
> This fixed the US TOS issue for ST TOS, but I just noticed a regression
> for STE TOS. There isn't anymore keyclick sound on STE desktop,
> just a short sound on first key press and then silence...
That's surprising, I tested with 1.62fr and 1.62us and didn't notice
your problem ; do you get sound with a demo/game started from tos ?
If you uncomment line 105-106 in main.c (to use SDL functions), does it
still happen ?
>>
>> nanosleep() and gettimeofday() are POSIX, so all conforming unixes
>> should have them (Linux and OSX for example).
>
> As only the interval is interesting (not timezone etc corrected
> wall clock time) why to use gettimeofday() instead of
> clock_gettime(CLOCK_MONOTONIC,...)?
Because I wanted to have a function that works for OSX too, and
clock_gettime is not available up to OSX 10.6 at least from what I found
(it seems Apple didn't implement these posix extensions).
clock_gettime gives nanosec when reading it, but as long as we need only
microsec, it's not necessarily useful for our case.
Well, of course, if someone use settimeoday() while hatari is running,
this can mess with gettimeofday, but I'm not sure this is a real problem ?
Nicolas
More information about the hatari-devel
mailing list