We need to dispose() our clip buffers on the main thread.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4095 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-05-08 16:51:48 +00:00
parent f07c7307c9
commit b31556e388
@@ -132,11 +132,15 @@ public class SoundManager
_clips.setRemovalObserver( _clips.setRemovalObserver(
new LRUHashMap.RemovalObserver<Comparable,ClipBuffer>() { new LRUHashMap.RemovalObserver<Comparable,ClipBuffer>() {
public void removedFromMap (LRUHashMap<Comparable,ClipBuffer> map, public void removedFromMap (LRUHashMap<Comparable,ClipBuffer> map,
ClipBuffer item) { final ClipBuffer item) {
_rqueue.postRunnable(new Runnable() {
public void run () {
Log.debug("Flushing " + item.getKey()); Log.debug("Flushing " + item.getKey());
item.dispose(); item.dispose();
} }
}); });
}
});
// create our loading queue // create our loading queue
_toLoad = new Queue(); _toLoad = new Queue();