Added pan control for looping sounds

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3981 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mark Johnson
2006-03-25 20:55:55 +00:00
parent 5690a38096
commit 8298025a11
@@ -338,10 +338,22 @@ public class SoundManager
*/
public Frob loop (SoundType type, String pkgPath, String key)
{
return loop(type, pkgPath, key, PAN_CENTER);
}
/**
* Loop the specified sound.
*/
public Frob loop (SoundType type, String pkgPath, String key, float pan)
{
if (type == null) {
type = DEFAULT;
}
if (!isEnabled(type)) {
return null;
}
SoundKey skey = new SoundKey(LOOP, pkgPath, key, 0, _clipVol, 0f);
SoundKey skey = new SoundKey(LOOP, pkgPath, key, 0, _clipVol, pan);
addToPlayQueue(skey);
return skey; // it is a frob
}