aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorMax Horn2005-03-12 18:56:09 +0000
committerMax Horn2005-03-12 18:56:09 +0000
commit7cd2cb2b1700b85d48aed8898b08b49b9b46ebf8 (patch)
tree7849605aa45912d9cbe65dbb68b2b450bd32b023 /sword1
parent8de216f3aec1dcee16fc0ab9974da4087bac5252 (diff)
downloadscummvm-rg350-7cd2cb2b1700b85d48aed8898b08b49b9b46ebf8.tar.gz
scummvm-rg350-7cd2cb2b1700b85d48aed8898b08b49b9b46ebf8.tar.bz2
scummvm-rg350-7cd2cb2b1700b85d48aed8898b08b49b9b46ebf8.zip
PlayingSoundHandle -> SoundHandle; also, turned the handle activity check into a mixer method
svn-id: r17106
Diffstat (limited to 'sword1')
-rw-r--r--sword1/animation.cpp2
-rw-r--r--sword1/credits.cpp2
-rw-r--r--sword1/sound.cpp4
-rw-r--r--sword1/sound.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/sword1/animation.cpp b/sword1/animation.cpp
index 927bdc7543..7dcf01e70a 100644
--- a/sword1/animation.cpp
+++ b/sword1/animation.cpp
@@ -70,7 +70,7 @@ OverlayColor *AnimationState::giveRgbBuffer(void) {
}
bool AnimationState::soundFinished(void) {
- return !_bgSound.isActive();
+ return !_snd->isSoundHandleActive(_bgSound);
}
AudioStream *AnimationState::createAudioStream(const char *name, void *arg) {
diff --git a/sword1/credits.cpp b/sword1/credits.cpp
index 9db7217156..3ab89bbe11 100644
--- a/sword1/credits.cpp
+++ b/sword1/credits.cpp
@@ -112,7 +112,7 @@ void CreditsPlayer::play(void) {
_system->updateScreen();
// everything's initialized, time to render and show the credits.
- PlayingSoundHandle bgSound;
+ SoundHandle bgSound;
_mixer->playInputStream(SoundMixer::kMusicSoundType, &bgSound, bgSoundStream, 0);
int relDelay = 0;
diff --git a/sword1/sound.cpp b/sword1/sound.cpp
index a55c476448..cde9e867dc 100644
--- a/sword1/sound.cpp
+++ b/sword1/sound.cpp
@@ -100,7 +100,7 @@ void Sound::engine(void) {
if (_fxQueue[cnt2].delay == 0)
playSample(&_fxQueue[cnt2]);
} else {
- if (!_fxQueue[cnt2].handle.isActive()) { // sound finished
+ if (!_mixer->isSoundHandleActive(_fxQueue[cnt2].handle)) { // sound finished
_resMan->resClose(_fxList[_fxQueue[cnt2].id].sampleId);
if (cnt2 != _endOfQueue-1)
_fxQueue[cnt2] = _fxQueue[_endOfQueue - 1];
@@ -130,7 +130,7 @@ bool Sound::amISpeaking(void) {
}
bool Sound::speechFinished(void) {
- return !_speechHandle.isActive();
+ return !_mixer->isSoundHandleActive(_speechHandle);
}
void Sound::newScreen(uint32 screen) {
diff --git a/sword1/sound.h b/sword1/sound.h
index de0f82c08c..982a941a4b 100644
--- a/sword1/sound.h
+++ b/sword1/sound.h
@@ -42,7 +42,7 @@ namespace Sword1 {
struct QueueElement {
uint32 id, delay;
- PlayingSoundHandle handle;
+ SoundHandle handle;
};
struct RoomVol {
@@ -101,7 +101,7 @@ private:
uint32 _cowHeaderSize;
uint8 _currentCowFile;
CowMode _cowMode;
- PlayingSoundHandle _speechHandle, _fxHandle;
+ SoundHandle _speechHandle, _fxHandle;
Common::RandomSource _rnd;
QueueElement _fxQueue[MAX_FXQ_LENGTH];