Never drain(), it's just buggy.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2954 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2004-02-12 04:14:21 +00:00
parent 66b627ef2c
commit 3ae08bc60d
@@ -1,5 +1,5 @@
// //
// $Id: SoundManager.java,v 1.68 2004/02/04 19:04:46 ray Exp $ // $Id: SoundManager.java,v 1.69 2004/02/12 04:14:21 ray Exp $
package com.threerings.media.sound; package com.threerings.media.sound;
@@ -1090,16 +1090,18 @@ public class SoundManager
// There is a major bug with using drain() under linux. It often // There is a major bug with using drain() under linux. It often
// causes the thread to just loop forever inside the native // causes the thread to just loop forever inside the native
// implementation of drain(), and we're screwed. // implementation of drain(), and we're screwed.
if (!RunAnywhere.isLinux()) { // UPDATE- it seems that it happens under windows as well sometimes
_line.drain(); // so I am now just disabling drain.
if (true || RunAnywhere.isLinux()) {
} else {
// we instead attempt to sleep long enough such that // we instead attempt to sleep long enough such that
// everything should be drained. // everything should be drained.
try { try {
Thread.sleep(NO_DRAIN_SLEEP_TIME); Thread.sleep(NO_DRAIN_SLEEP_TIME);
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
} }
} else {
_line.drain();
} }
// clear it out so that we can wait for more. // clear it out so that we can wait for more.