aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sound.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-05 20:14:28 +0000
committerJohannes Schickel2010-01-05 20:14:28 +0000
commit920dac2f9d271889ffdc6c05313c89a6077ec2d2 (patch)
tree5ca24942081a5171605aea463febd5a06860d5ac /engines/kyra/sound.cpp
parente9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6 (diff)
downloadscummvm-rg350-920dac2f9d271889ffdc6c05313c89a6077ec2d2.tar.gz
scummvm-rg350-920dac2f9d271889ffdc6c05313c89a6077ec2d2.tar.bz2
scummvm-rg350-920dac2f9d271889ffdc6c05313c89a6077ec2d2.zip
Remove unsafe getTotalPlayTime from AudioStream.
svn-id: r47037
Diffstat (limited to 'engines/kyra/sound.cpp')
-rw-r--r--engines/kyra/sound.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index e5ae400de3..34c9b3d223 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -74,21 +74,21 @@ bool Sound::isVoicePresent(const char *file) {
}
int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) {
- Audio::AudioStream *audioStream = getVoiceStream(file);
+ Audio::SeekableAudioStream *audioStream = getVoiceStream(file);
if (!audioStream) {
return 0;
}
- int playTime = audioStream->getTotalPlayTime();
+ int playTime = audioStream->getLength().msecs();
playVoiceStream(audioStream, handle, volume, isSfx);
return playTime;
}
-Audio::AudioStream *Sound::getVoiceStream(const char *file) {
+Audio::SeekableAudioStream *Sound::getVoiceStream(const char *file) {
char filenamebuffer[25];
- Audio::AudioStream *audioStream = 0;
+ Audio::SeekableAudioStream *audioStream = 0;
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
strcpy(filenamebuffer, file);
strcat(filenamebuffer, _supportedCodecs[i].fileext);