aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
Diffstat (limited to 'saga')
-rw-r--r--saga/music.cpp5
-rw-r--r--saga/music.h2
-rw-r--r--saga/sound.cpp2
-rw-r--r--saga/sound.h6
4 files changed, 7 insertions, 8 deletions
diff --git a/saga/music.cpp b/saga/music.cpp
index d58c39676f..0e239fa81c 100644
--- a/saga/music.cpp
+++ b/saga/music.cpp
@@ -350,7 +350,7 @@ Music::~Music() {
}
bool Music::isPlaying() {
- return _musicHandle.isActive() || _player->isPlaying();
+ return _mixer->isSoundHandleActive(_musicHandle) || _player->isPlaying();
}
// The Wyrmkeep release of Inherit The Earth features external MIDI files, so
@@ -409,8 +409,7 @@ int Music::play(uint32 music_rn, uint16 flags) {
_player->stopMusic();
- if (_musicHandle.isActive())
- _mixer->stopHandle(_musicHandle);
+ _mixer->stopHandle(_musicHandle);
AudioStream *audioStream = NULL;
MidiParser *parser;
diff --git a/saga/music.h b/saga/music.h
index 707da30727..993df56a27 100644
--- a/saga/music.h
+++ b/saga/music.h
@@ -125,7 +125,7 @@ private:
SoundMixer *_mixer;
MusicPlayer *_player;
- PlayingSoundHandle _musicHandle;
+ SoundHandle _musicHandle;
uint32 _trackNumber;
static const MUSIC_MIDITABLE _midiTableITECD[26];
diff --git a/saga/sound.cpp b/saga/sound.cpp
index 9db219934c..0a6a2bd061 100644
--- a/saga/sound.cpp
+++ b/saga/sound.cpp
@@ -152,7 +152,7 @@ Sound::~Sound() {
_soundInitialized = 0;
}
-int Sound::playSoundBuffer(PlayingSoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop) {
+int Sound::playSoundBuffer(SoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop) {
byte flags;
if (!_soundInitialized) {
diff --git a/saga/sound.h b/saga/sound.h
index 7b0fee51c8..a0b73d69e0 100644
--- a/saga/sound.h
+++ b/saga/sound.h
@@ -64,7 +64,7 @@ public:
private:
- int playSoundBuffer(PlayingSoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop);
+ int playSoundBuffer(SoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop);
int _soundInitialized;
int _enabled;
@@ -72,8 +72,8 @@ public:
SagaEngine *_vm;
SoundMixer *_mixer;
- PlayingSoundHandle _effectHandle;
- PlayingSoundHandle _voiceHandle;
+ SoundHandle _effectHandle;
+ SoundHandle _voiceHandle;
};