aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/sound.cpp10
-rw-r--r--engines/kyra/sound.h12
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 77fd8e2346..e58e0c6359 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -59,7 +59,7 @@ bool Sound::isPlaying() const {
return false;
}
-bool Sound::voiceFileIsPresent(const char *file) {
+bool Sound::voiceFileIsPresent(const char *file) const {
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
Common::String f = file;
f += _supportedCodecs[i].fileext;
@@ -70,7 +70,7 @@ bool Sound::voiceFileIsPresent(const char *file) {
return false;
}
-bool Sound::isVoicePresent(const char *file) {
+bool Sound::isVoicePresent(const char *file) const {
char filenamebuffer[25];
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
@@ -96,7 +96,7 @@ int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volum
return playTime;
}
-Audio::SeekableAudioStream *Sound::getVoiceStream(const char *file) {
+Audio::SeekableAudioStream *Sound::getVoiceStream(const char *file) const {
char filenamebuffer[25];
Audio::SeekableAudioStream *audioStream = 0;
@@ -152,7 +152,7 @@ void Sound::voiceStop(const Audio::SoundHandle *handle) {
}
}
-bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) {
+bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) const {
if (!handle) {
for (int h = 0; h < kNumChannelHandles; ++h) {
if (_mixer->isSoundHandleActive(_soundChannels[h]))
@@ -165,7 +165,7 @@ bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) {
return false;
}
-bool Sound::allVoiceChannelsPlaying() {
+bool Sound::allVoiceChannelsPlaying() const {
for (int i = 0; i < kNumChannelHandles; ++i)
if (!_mixer->isSoundHandleActive(_soundChannels[i]))
return false;
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 36e7058182..fb1f58d154 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -163,7 +163,7 @@ public:
void enableSFX(bool enable) { _sfxEnabled = enable; }
bool sfxEnabled() const { return _sfxEnabled; }
- virtual bool voiceFileIsPresent(const char *file);
+ virtual bool voiceFileIsPresent(const char *file) const;
/**
* Checks whether a voice file with the given name is present
@@ -171,7 +171,7 @@ public:
* @param file file name
* @return true if available, false otherwise
*/
- bool isVoicePresent(const char *file);
+ bool isVoicePresent(const char *file) const;
/**
* Plays the specified voice file.
@@ -188,7 +188,7 @@ public:
*/
virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
- Audio::SeekableAudioStream *getVoiceStream(const char *file);
+ Audio::SeekableAudioStream *getVoiceStream(const char *file) const;
bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
@@ -197,21 +197,21 @@ public:
*
* @return true when playing, else false
*/
- bool voiceIsPlaying(const Audio::SoundHandle *handle = 0);
+ bool voiceIsPlaying(const Audio::SoundHandle *handle = 0) const;
/**
* Checks if all voice handles are used.
*
* @return false when a handle is free, else true
*/
- bool allVoiceChannelsPlaying();
+ bool allVoiceChannelsPlaying() const;
/**
* Checks how long a voice has been playing
*
* @return time in milliseconds
*/
- uint32 voicePlayedTime(const Audio::SoundHandle &handle) {
+ uint32 voicePlayedTime(const Audio::SoundHandle &handle) const {
return _mixer->getSoundElapsedTime(handle);
}