aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2005-03-12 18:56:09 +0000
committerMax Horn2005-03-12 18:56:09 +0000
commit7cd2cb2b1700b85d48aed8898b08b49b9b46ebf8 (patch)
tree7849605aa45912d9cbe65dbb68b2b450bd32b023 /simon
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 'simon')
-rw-r--r--simon/sound.cpp26
-rw-r--r--simon/sound.h6
-rw-r--r--simon/vga.cpp4
3 files changed, 18 insertions, 18 deletions
diff --git a/simon/sound.cpp b/simon/sound.cpp
index 4c2cb6a924..93dc9fddf9 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -45,25 +45,25 @@ public:
BaseSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false);
BaseSound(SoundMixer *mixer, File *file, uint32 *offsets, bool bigendian = false);
virtual ~BaseSound();
- virtual void playSound(uint sound, PlayingSoundHandle *handle, byte flags) = 0;
+ virtual void playSound(uint sound, SoundHandle *handle, byte flags) = 0;
};
class WavSound : public BaseSound {
public:
WavSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
WavSound(SoundMixer *mixer, File *file, uint32 *offsets) : BaseSound(mixer, file, offsets) {};
- void playSound(uint sound, PlayingSoundHandle *handle, byte flags);
+ void playSound(uint sound, SoundHandle *handle, byte flags);
};
class VocSound : public BaseSound {
public:
VocSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
- void playSound(uint sound, PlayingSoundHandle *handle, byte flags);
+ void playSound(uint sound, SoundHandle *handle, byte flags);
};
class RawSound : public BaseSound {
public:
RawSound(SoundMixer *mixer, File *file, uint32 base = 0, bool bigendian = false) : BaseSound(mixer, file, base, bigendian) {};
- void playSound(uint sound, PlayingSoundHandle *handle, byte flags);
+ void playSound(uint sound, SoundHandle *handle, byte flags);
};
BaseSound::BaseSound(SoundMixer *mixer, File *file, uint32 base, bool bigendian) {
@@ -117,7 +117,7 @@ BaseSound::~BaseSound() {
delete _file;
}
-void WavSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
+void WavSound::playSound(uint sound, SoundHandle *handle, byte flags) {
if (_offsets == NULL)
return;
@@ -132,7 +132,7 @@ void WavSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
_mixer->playInputStream(SoundMixer::kSFXSoundType, handle, stream);
}
-void VocSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
+void VocSound::playSound(uint sound, SoundHandle *handle, byte flags) {
if (_offsets == NULL)
return;
@@ -144,7 +144,7 @@ void VocSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
_mixer->playRaw(handle, buffer, size, samples_per_sec, flags | SoundMixer::FLAG_AUTOFREE);
}
-void RawSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
+void RawSound::playSound(uint sound, SoundHandle *handle, byte flags) {
if (_offsets == NULL)
return;
@@ -161,10 +161,10 @@ void RawSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags) {
class MP3Sound : public BaseSound {
public:
MP3Sound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
- void playSound(uint sound, PlayingSoundHandle *handle, byte flags);
+ void playSound(uint sound, SoundHandle *handle, byte flags);
};
-void MP3Sound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
+void MP3Sound::playSound(uint sound, SoundHandle *handle, byte flags)
{
if (_offsets == NULL)
return;
@@ -185,10 +185,10 @@ void MP3Sound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
class VorbisSound : public BaseSound {
public:
VorbisSound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
- void playSound(uint sound, PlayingSoundHandle *handle, byte flags);
+ void playSound(uint sound, SoundHandle *handle, byte flags);
};
-void VorbisSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
+void VorbisSound::playSound(uint sound, SoundHandle *handle, byte flags)
{
if (_offsets == NULL)
return;
@@ -209,10 +209,10 @@ void VorbisSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
class FlacSound : public BaseSound {
public:
FlacSound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
- void playSound(uint sound, PlayingSoundHandle *handle, byte flags);
+ void playSound(uint sound, SoundHandle *handle, byte flags);
};
-void FlacSound::playSound(uint sound, PlayingSoundHandle *handle, byte flags)
+void FlacSound::playSound(uint sound, SoundHandle *handle, byte flags)
{
if (_offsets == NULL)
return;
diff --git a/simon/sound.h b/simon/sound.h
index 228b4addea..28c988d1d3 100644
--- a/simon/sound.h
+++ b/simon/sound.h
@@ -45,9 +45,9 @@ private:
uint16 _last_voice_file;
public:
- PlayingSoundHandle _voice_handle;
- PlayingSoundHandle _effects_handle;
- PlayingSoundHandle _ambient_handle;
+ SoundHandle _voice_handle;
+ SoundHandle _effects_handle;
+ SoundHandle _ambient_handle;
bool _voice_file;
uint _ambient_playing;
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 5ff57296a4..3f2e44a6c4 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -1606,7 +1606,7 @@ void SimonEngine::vc_59() {
vc_kill_sprite(file, start);
} while (++start != end);
} else {
- if (!_sound->_voice_handle.isActive())
+ if (!_mixer->isSoundHandleActive(_sound->_voice_handle))
vc_skip_next_instruction();
}
}
@@ -1789,7 +1789,7 @@ void SimonEngine::vc_63_palette_thing_2() {
void SimonEngine::vc_64_skip_if_no_speech() {
// Simon2
- if (!_sound->_voice_handle.isActive() || (_subtitles && _language != 20))
+ if (!_mixer->isSoundHandleActive(_sound->_voice_handle) || (_subtitles && _language != 20))
vc_skip_next_instruction();
}