Skip to content

Commit 752c58c

Browse files
committed
Fix: Loop, volume and pan was not used when playing a sound.
1 parent 0437417 commit 752c58c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

blade-engine/src/com/bladecoder/engine/model/SceneSoundManager.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ public void playSound(String id) {
4444
}
4545

4646
if (s != null) {
47-
s.sound.play();
47+
if(s.desc.getLoop())
48+
s.sound.loop(s.desc.getVolume(), 1, s.desc.getPan());
49+
else
50+
s.sound.play(s.desc.getVolume(), 1, s.desc.getPan());
51+
4852
s.playing = true;
4953
} else {
5054
EngineLogger.error("Sound Not Found: " + id);

0 commit comments

Comments
 (0)