1786d9973558c0538ecb3f32cd695613c789c658
returned sound time. This is tricky: we may be interrupted, causing timing error. We tried working around this by trying to hint the scheduler that we're in a period where we don't want to be interrupted, even though we're in a thread that's not normally high priority, by boosting the priority temporarily. This worked in Windows, but not in general; it's too far out of the expectations of schedulers and generally just made things worse. Let's look at this like an interruption-based lockless algorithm: try it, see if it succeeded, and if it failed, try again. Retrying even once should be a rare exception, but failsafe anyway, so a bug in a sound driver won't hang.
Languages
C++
85.7%
Lua
4.3%
C
4.3%
Rich Text Format
2.3%
CMake
1.1%
Other
2%