Give OpenALSoundPlayer its own thread and queue to keep it from sharing with the EDT and possibly blocking

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@639 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Charlie Groves
2008-08-20 23:31:21 +00:00
parent 1bd35bd926
commit 0abacd42d3
2 changed files with 128 additions and 26 deletions
@@ -125,6 +125,15 @@ public abstract class FrameManager
* @see #newInstance(ManagedRoot, MediaTimer)
*/
public static FrameManager newInstance (ManagedRoot root)
{
return newInstance(root, createTimer());
}
/**
* Attempts to create a high resolution timer, but if that isn't possible, uses a
* System.currentTimeMillis based timer.
*/
public static MediaTimer createTimer ()
{
MediaTimer timer = null;
for (String timerClass : PERF_TIMERS) {
@@ -140,7 +149,7 @@ public abstract class FrameManager
"System.currentTimeMillis() based timer.");
timer = new MillisTimer();
}
return newInstance(root, timer);
return timer;
}
/**