aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/voyeur/sound.cpp')
-rw-r--r--engines/voyeur/sound.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/voyeur/sound.cpp b/engines/voyeur/sound.cpp
index 752a35dcc8..ea6f9fa525 100644
--- a/engines/voyeur/sound.cpp
+++ b/engines/voyeur/sound.cpp
@@ -24,6 +24,7 @@
#include "audio/decoders/raw.h"
#include "common/memstream.h"
#include "voyeur/sound.h"
+#include "voyeur/staticres.h"
namespace Voyeur {
@@ -60,11 +61,18 @@ void SoundManager::setVOCOffset(int offset) {
}
Common::String SoundManager::getVOCFileName(int idx) {
- error("TODO: getVOCFileName");
+ return Common::String::format("%s.voc", VOC_FILENAMES[idx]);
}
void SoundManager::startVOCPlay(const Common::String &filename) {
- error("TODO: startVOCPlay");
+ Common::File f;
+ if (!f.open(filename))
+ error("Could not find voc file - %s", filename.c_str());
+
+ Audio::AudioStream *audioStream = Audio::makeVOCStream(f.readStream(f.size()),
+ Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
+
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream);
}
int SoundManager::getVOCStatus() {