aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/scene_v2.cpp2
-rw-r--r--engines/kyra/sound.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp
index ef9fde2eea..498ddc1c6b 100644
--- a/engines/kyra/scene_v2.cpp
+++ b/engines/kyra/scene_v2.cpp
@@ -115,7 +115,7 @@ void KyraEngine_v2::enterNewScene(uint16 newScene, int facing, int unk1, int unk
if (newSoundFile) {
if (_sound->getMusicType() == Sound::kAdlib) {
- while (((SoundAdlibPC*)_sound)->isPlaying())
+ while (_sound->isPlaying())
_system->delayMillis(10);
} else {
while (waitTime > _system->getMillis())
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 0c40dec323..0ffb1c73b5 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -138,6 +138,13 @@ public:
virtual void playSoundEffect(uint8 track) = 0;
/**
+ * Checks if the sound driver plays any sound
+ *
+ * @return true if playing, false otherwise
+ */
+ virtual bool isPlaying() const { return false; }
+
+ /**
* Starts fading out the volume.
*
* This keeps fading out the output until
@@ -465,6 +472,7 @@ public:
void playTrack(uint8 track) { _music->playTrack(track); }
void haltTrack() { _music->haltTrack(); }
+ bool isPlaying() const { return _music->isPlaying() | _sfx->isPlaying(); }
void playSoundEffect(uint8 track) { _sfx->playSoundEffect(track); }