Renamed package: sound -> sounds

This commit is contained in:
Ondřej Hruška
2014-04-07 10:08:30 +02:00
parent ae785dc440
commit 8073c5d712
12 changed files with 21 additions and 21 deletions
@@ -0,0 +1,37 @@
package mightypork.rogue.sounds.players;
import mightypork.rogue.sounds.DeferredAudio;
import mightypork.utils.math.coord.Coord;
import mightypork.utils.objects.Mutable;
public class EffectPlayer extends BaseAudioPlayer {
public EffectPlayer(DeferredAudio track, double basePitch, double baseGain, Mutable<Double> gainMultiplier) {
super(track, (float) basePitch, (float) baseGain, gainMultiplier);
}
public int play(double pitch, double gain)
{
if (!hasAudio()) return -1;
return getAudio().playAsEffect(getPitch(pitch), getGain(gain), false);
}
public int play(double gain)
{
return play(1, gain);
}
public int play(double pitch, double gain, Coord pos)
{
if (!hasAudio()) return -1;
return getAudio().playAsEffect(getPitch(pitch), getGain(gain), false, pos);
}
}