Glenn Maynard 1786d99735 GetPositionSeconds(&tm) returns the clock time timestamp associated with the
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.
2006-12-19 08:00:45 +00:00
S
Description
554 MiB
Languages
C++ 85.7%
Lua 4.3%
C 4.3%
Rich Text Format 2.3%
CMake 1.1%
Other 2%