From 83d9cf3363572926f1e6af29ceba748d5439033b Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 4 Dec 2002 21:42:34 +0000 Subject: [PATCH] added versions of lock() and unlock() that take a list of sound keys to operate on. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2023 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/media/sound/SoundManager.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/sound/SoundManager.java b/src/java/com/threerings/media/sound/SoundManager.java index 839b34301..3112c2b90 100644 --- a/src/java/com/threerings/media/sound/SoundManager.java +++ b/src/java/com/threerings/media/sound/SoundManager.java @@ -1,5 +1,5 @@ // -// $Id: SoundManager.java,v 1.36 2002/12/04 02:14:12 ray Exp $ +// $Id: SoundManager.java,v 1.37 2002/12/04 21:42:34 ray Exp $ package com.threerings.media; @@ -275,6 +275,26 @@ public class SoundManager } } + /** + * Batch lock a list of sounds. + */ + public void lock (String pkgPath, String[] keys) + { + for (int ii=0; ii < keys.length; ii++) { + lock(pkgPath, keys[ii]); + } + } + + /** + * Batch unlock a list of sounds. + */ + public void unlock (String pkgPath, String[] keys) + { + for (int ii=0; ii < keys.length; ii++) { + unlock(pkgPath, keys[ii]); + } + } + /** * Play the specified sound of as the specified type of sound. * Note that a sound need not be locked prior to playing.