Open mazmazz opened 6 years ago
Is the right solution to execute hook every millisecond in mixer_sound? Is this desirable to call lua from I_Sound hardware code?
If from mixer, Millisecond hook must be performant or it will slow down sound processing.
Can we call a function every millisecond anywhere in the source?
At the very least, having a Frame hook outside of a level would be very helpful.
Advice from LJ Sonic:
Performance impact from running a hook 100 or 1000 times a second?
Possibly use system timers (or some kind of timer) to decouple from 1/TICRATE?
BUT: system timers are only checked 35 times a second. Sooooo, not possible? How to overcome this?
Because
Doesn't have to be 1/1000th (millisecond), I think 1/100th (centisecond) is good enough. Better than 1/35th, where music jumps are perceptible from imprecise position reading.