From 1e9bce479dd2c8fe3965fc68155b906e6906a988 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 29 Jan 2014 23:08:59 -0500 Subject: VOYEUR: Fixes for reviewing audio events in review tape --- engines/voyeur/data.cpp | 2 +- engines/voyeur/sound.cpp | 3 ++- engines/voyeur/voyeur_game.cpp | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp index be22a58f28..64b15f72c6 100644 --- a/engines/voyeur/data.cpp +++ b/engines/voyeur/data.cpp @@ -153,7 +153,7 @@ void SVoy::addAudioEventStart() { e._isAM = _isAM; e._type = EVTYPE_AUDIO; e._videoId = _vm->_videoId; - e._computerOn = _field47A; + e._computerOn = _vocSecondsOffset; e._dead = _vm->_eventsManager._videoDead; } diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp index 22751da48e..aab49be851 100644 --- a/engines/voyeur/sound.cpp +++ b/engines/voyeur/sound.cpp @@ -87,7 +87,8 @@ int SoundManager::getVOCStatus() { } uint32 SoundManager::getVOCFrame() { - error("TODO: getVOCFrame"); + Audio::Timestamp timestamp = _mixer->getElapsedTime(_soundHandle); + return timestamp.secs(); } } // End of namespace Voyeur diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index 1d7daef422..c645643163 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -688,10 +688,11 @@ void VoyeurEngine::reviewTape() { // Play suond for the given duration _soundManager.setVOCOffset(_voy._vocSecondsOffset); _soundManager.startVOCPlay(_videoId + 159); - uint32 offFrame = e._computerOff; + uint32 secondsDuration = e._computerOff; + _eventsManager.getMouseInfo(); while (!_eventsManager._mouseClicked && _soundManager.getVOCStatus() && - _soundManager.getVOCFrame() < offFrame) { + _soundManager.getVOCFrame() < secondsDuration) { _eventsManager.getMouseInfo(); _eventsManager.delay(10); } -- cgit v1.2.3