Re: [AD] Add timeBeginPeriod(1) to wtimer.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Fri, 2005-02-18 at 10:07 -0800, Chris wrote:
>
> #ifdef ALLEGRO_WINDOWS
> timeBeginPeriod(get_config_int(...));
> #endif
>
I think it would be best to make it a config option. So, you can use
"[system]win_scheduler_precision=3" to set the precision to 3ms. The
default, 0, would mean the default is not touched (so on windows systems
with a 1ms scheduler, it will use 1ms in any case). The config variable
could be read inside install_timer (or allegro_init?), and in case it is
set, there's a global call to timeBeginPeriod/timeEndPeriod.
I think the config system is here just for driver/system specific
settings like this. About calling it only inside rest() - I'm not really
sure, I wouldn't know when I'd need that personally (actually, where I'd
like better precision is in the digmid driver in linux.. allegro times
midis quite wrong on my system.. playing some notes slow and then some
very fast after that. In windows however, midis sound completely right
even with the current timing..)
--
Elias Pschernig