diff --git a/src/java/com/threerings/openal/SoundGroup.java b/src/java/com/threerings/openal/SoundGroup.java index efd2ec21..ff3e5b89 100644 --- a/src/java/com/threerings/openal/SoundGroup.java +++ b/src/java/com/threerings/openal/SoundGroup.java @@ -63,6 +63,20 @@ public class SoundGroup * longer be usable and should be discarded. */ public void dispose () + { + reclaimAll(); + if (_sourceIds != null) { + _sources.clear(); + AL10.alDeleteSources(_sourceIds); + _sourceIds = null; + } + } + + /** + * Stops and reclaims all sounds from this sound group but does not + * free the sources. + */ + public void reclaimAll () { if (_sourceIds != null) { // make sure any bound sources are released @@ -72,9 +86,6 @@ public class SoundGroup source.holder.reclaim(); } } - _sources.clear(); - AL10.alDeleteSources(_sourceIds); - _sourceIds = null; } }