aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/voyeur/files_threads.cpp2
-rw-r--r--engines/voyeur/sound.cpp9
-rw-r--r--engines/voyeur/sound.h1
-rw-r--r--engines/voyeur/voyeur_game.cpp4
4 files changed, 11 insertions, 5 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 5920ca0f54..92b0191dde 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -396,7 +396,7 @@ void ThreadResource::parsePlayCommands() {
_vm->flipPageAndWaitForFade();
_vm->_voy._field478 &= ~1;
- _vm->_soundManager.setVOCOffset(_vm->_voy._vocSecondsOffset * 11025);
+ _vm->_soundManager.setVOCOffset(_vm->_voy._vocSecondsOffset);
Common::String filename = _vm->_soundManager.getVOCFileName(
_vm->_videoId + 159);
_vm->_soundManager.startVOCPlay(filename);
diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp
index 73051211e0..22751da48e 100644
--- a/engines/voyeur/sound.cpp
+++ b/engines/voyeur/sound.cpp
@@ -30,6 +30,7 @@ namespace Voyeur {
SoundManager::SoundManager(Audio::Mixer *mixer) {
_mixer = mixer;
+ _vocOffset = 0;
}
void SoundManager::playVOCMap(byte *voc, int vocSize) {
@@ -40,7 +41,7 @@ void SoundManager::playVOCMap(byte *voc, int vocSize) {
}
bool SoundManager::vocMapStatus() {
- // TODO
+ error("TODO: vocMapStatus");
return false;
}
@@ -54,10 +55,11 @@ void SoundManager::abortVOCMap() {
void SoundManager::stopVOCPlay() {
_mixer->stopHandle(_soundHandle);
+ _vocOffset = 0;
}
void SoundManager::setVOCOffset(int offset) {
- error("TODO: setVOCOffset");
+ _vocOffset = offset;
}
Common::String SoundManager::getVOCFileName(int idx) {
@@ -69,10 +71,11 @@ void SoundManager::startVOCPlay(const Common::String &filename) {
if (!f.open(filename))
error("Could not find voc file - %s", filename.c_str());
- Audio::AudioStream *audioStream = Audio::makeVOCStream(f.readStream(f.size()),
+ Audio::SeekableAudioStream *audioStream = Audio::makeVOCStream(f.readStream(f.size()),
Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream);
+ audioStream->seek(Audio::Timestamp(_vocOffset * 1000, 11025));
}
void SoundManager::startVOCPlay(int soundId) {
diff --git a/engines/voyeur/sound.h b/engines/voyeur/sound.h
index 729a7d9da1..8b4feaaaad 100644
--- a/engines/voyeur/sound.h
+++ b/engines/voyeur/sound.h
@@ -36,6 +36,7 @@ private:
VoyeurEngine *_vm;
Audio::Mixer *_mixer;
Audio::SoundHandle _soundHandle;
+ int _vocOffset;
public:
SoundManager(Audio::Mixer *mixer);
void setVm(VoyeurEngine *vm) { _vm = vm; }
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index ded40ce121..1d7daef422 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -670,6 +670,8 @@ void VoyeurEngine::reviewTape() {
case EVTYPE_AUDIO: {
_videoId = e._videoId;
_voy._vocSecondsOffset = e._computerOn;
+
+ _bVoy->getBoltGroup(0x7F00);
_graphicsManager._backgroundPage = _bVoy->boltEntry(0x7F00 +
BLIND_TABLE[_videoId])._picResource;
_graphicsManager._backColors = _bVoy->boltEntry(0x7F01 +
@@ -684,7 +686,7 @@ void VoyeurEngine::reviewTape() {
_voy._field478 &= ~1;
// Play suond for the given duration
- _soundManager.setVOCOffset(_voy._vocSecondsOffset * 11025);
+ _soundManager.setVOCOffset(_voy._vocSecondsOffset);
_soundManager.startVOCPlay(_videoId + 159);
uint32 offFrame = e._computerOff;