diff options
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 3 | ||||
-rw-r--r-- | engines/glk/sound.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 200adbb9fe..b78a067c89 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -266,8 +266,7 @@ void GlkInterface::os_start_sample(int number, int volume, int repeats, zword eo default: vol = 0x20000; break; } - // we dont do repeating or eos-callback for now... - glk_schannel_play_ext(gos_channel, number, 1, 0); + glk_schannel_play_ext(gos_channel, number, repeats, eos); glk_schannel_set_volume(gos_channel, vol); } diff --git a/engines/glk/sound.cpp b/engines/glk/sound.cpp index 1012c2040f..7a93b772f9 100644 --- a/engines/glk/sound.cpp +++ b/engines/glk/sound.cpp @@ -100,7 +100,9 @@ uint SoundChannel::play(uint soundNum, uint repeats, uint notify) { if (f.exists(nameSnd) && f.open(nameSnd)) { if (f.readUint16BE() != (f.size() - 2)) error("Invalid sound filesize"); - repeats = f.readByte(); + byte headerRepeats = f.readByte(); + if (headerRepeats > 0) + repeats = headerRepeats; f.skip(1); uint freq = f.readUint16BE(); f.skip(2); |