diff options
author | Johannes Schickel | 2010-01-05 20:14:28 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-05 20:14:28 +0000 |
commit | 920dac2f9d271889ffdc6c05313c89a6077ec2d2 (patch) | |
tree | 5ca24942081a5171605aea463febd5a06860d5ac /engines/kyra/sound_lol.cpp | |
parent | e9a94ecb9b6eb20cb7cdc4f838df3f9b049d2de6 (diff) | |
download | scummvm-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_lol.cpp')
-rw-r--r-- | engines/kyra/sound_lol.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 328a0e02d0..ad090609d1 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -58,7 +58,7 @@ bool LoLEngine::snd_playCharacterSpeech(int id, int8 speaker, int) { char file3[13]; file3[0] = 0; - Common::List<Audio::AudioStream *> newSpeechList; + SpeechList newSpeechList; snprintf(pattern2, sizeof(pattern2), "%02d", id & 0x4000 ? 0 : _curTlkFile); @@ -95,18 +95,18 @@ bool LoLEngine::snd_playCharacterSpeech(int id, int8 speaker, int) { while (_sound->allVoiceChannelsPlaying()) delay(_tickLength); - for (Common::List<Audio::AudioStream *>::iterator i = _speechList.begin(); i != _speechList.end(); ++i) + for (SpeechList::iterator i = _speechList.begin(); i != _speechList.end(); ++i) delete *i; _speechList.clear(); _speechList = newSpeechList; _activeVoiceFileTotalTime = 0; - for (Common::List<Audio::AudioStream *>::iterator i = _speechList.begin(); i != _speechList.end(); ++i) { + for (SpeechList::iterator i = _speechList.begin(); i != _speechList.end(); ++i) { // Just in case any file loading failed: Remove the bad streams here. if (!*i) i = _speechList.erase(i); else - _activeVoiceFileTotalTime += (*i)->getTotalPlayTime(); + _activeVoiceFileTotalTime += (*i)->getLength().msecs(); } _sound->playVoiceStream(*_speechList.begin(), &_speechHandle); @@ -151,7 +151,7 @@ void LoLEngine::snd_stopSpeech(bool setFlag) { _activeVoiceFileTotalTime = 0; _nextSpeechId = _nextSpeaker = -1; - for (Common::List<Audio::AudioStream *>::iterator i = _speechList.begin(); i != _speechList.end(); ++i) + for (SpeechList::iterator i = _speechList.begin(); i != _speechList.end(); ++i) delete *i; _speechList.clear(); |