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:
Andrzej Kapolka
2010-08-12 20:25:26 +00:00
parent c0a25ad407
commit 29ab63e86f
2 changed files with 3 additions and 5 deletions
@@ -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)
+2 -2
View File
@@ -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;
}