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:
@@ -338,10 +338,22 @@ public class SoundManager
|
|||||||
*/
|
*/
|
||||||
public Frob loop (SoundType type, String pkgPath, String key)
|
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)) {
|
if (!isEnabled(type)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
SoundKey skey = new SoundKey(LOOP, pkgPath, key, 0, _clipVol, 0f);
|
SoundKey skey = new SoundKey(LOOP, pkgPath, key, 0, _clipVol, pan);
|
||||||
addToPlayQueue(skey);
|
addToPlayQueue(skey);
|
||||||
return skey; // it is a frob
|
return skey; // it is a frob
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user