diff --git a/src/java/com/threerings/media/sound/SoundManager.java b/src/java/com/threerings/media/sound/SoundManager.java index c39d01b7..ad2acfc2 100644 --- a/src/java/com/threerings/media/sound/SoundManager.java +++ b/src/java/com/threerings/media/sound/SoundManager.java @@ -1010,7 +1010,16 @@ public class SoundManager protected float _clipVol = 1f; /** The cache of recent audio clips . */ - protected LRUHashMap _clipCache = new LRUHashMap(10); + protected LRUHashMap _clipCache = + new LRUHashMap(4 * 1024 * 1024, new LRUHashMap.ItemSizer() { + public int computeSize (byte[][] value) { + int total = 0; + for (byte[] bs : value) { + total += bs.length; + } + return total; + } + }); /** The set of locked audio clips; this is separate from the LRU so * that locking clips doesn't booch up an otherwise normal caching