Be consistent in how we apply the base gain.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@979 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -240,11 +240,9 @@ public class OpenALSoundPlayer extends SoundPlayer
|
||||
@Override
|
||||
protected Frob loop (String pkgPath, String key, float pan)
|
||||
{
|
||||
final float volume = getClipVolume();
|
||||
final SoundGrabber loader = new SoundGrabber(pkgPath, key) {
|
||||
@Override
|
||||
protected void soundLoaded () {
|
||||
sound.setGain(volume);
|
||||
sound.loop(true);
|
||||
}};
|
||||
getSoundQueue().postRunnable(loader);
|
||||
@@ -274,7 +272,7 @@ public class OpenALSoundPlayer extends SoundPlayer
|
||||
@Override
|
||||
public void play (String pkgPath, String key, float pan)
|
||||
{
|
||||
play(pkgPath, key, pan, getClipVolume());
|
||||
play(pkgPath, key, pan, 1f);
|
||||
}
|
||||
|
||||
public void play (String pkgPath, String key, float pan, final float gain)
|
||||
|
||||
@@ -85,12 +85,12 @@ public class Sound
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gain of the sound.
|
||||
* Sets the gain of the sound (which will be multiplied by the base gain).
|
||||
*/
|
||||
public void setGain (float gain)
|
||||
{
|
||||
if (_source != null) {
|
||||
_source.setGain(gain);
|
||||
_source.setGain(gain * _group.getBaseGain());
|
||||
}
|
||||
_gain = gain;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user