From 920dac2f9d271889ffdc6c05313c89a6077ec2d2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 5 Jan 2010 20:14:28 +0000 Subject: Remove unsafe getTotalPlayTime from AudioStream. svn-id: r47037 --- engines/kyra/sound_lol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/kyra/sound_lol.cpp') 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 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::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::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::iterator i = _speechList.begin(); i != _speechList.end(); ++i) + for (SpeechList::iterator i = _speechList.begin(); i != _speechList.end(); ++i) delete *i; _speechList.clear(); -- cgit v1.2.3