aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2004-01-03 00:55:40 +0000
committerMax Horn2004-01-03 00:55:40 +0000
commit56eae68e8bafde62e28af1cf5302d52424362684 (patch)
tree27ee8e2f19ce743f14fd480d622a79c8074f5c98 /scumm/sound.cpp
parent96e2c239c4bc2a6f91d3fb141551eac06187b076 (diff)
downloadscummvm-rg350-56eae68e8bafde62e28af1cf5302d52424362684.tar.gz
scummvm-rg350-56eae68e8bafde62e28af1cf5302d52424362684.tar.bz2
scummvm-rg350-56eae68e8bafde62e28af1cf5302d52424362684.zip
re-enabled .sog and .so3 support for FT
svn-id: r12096
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 42e7280329..13217e710c 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -34,7 +34,9 @@
#include "sound/audiocd.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
+#include "sound/mp3.h"
#include "sound/voc.h"
+#include "sound/vorbis.h"
namespace Scumm {
@@ -811,27 +813,27 @@ void Sound::pauseSounds(bool pause) {
void Sound::startSfxSound(File *file, int file_size, PlayingSoundHandle *handle, int id) {
+ AudioInputStream *input;
+
+
if (file_size > 0) {
if (_vorbis_mode) {
#ifdef USE_VORBIS
- _scumm->_mixer->playVorbis(handle, file, file_size, 255, 0, id);
+ input = makeVorbisStream(file, file_size);
#endif
} else {
#ifdef USE_MAD
- _scumm->_mixer->playMP3(handle, file, file_size, 255, 0, id);
+ input = makeMP3Stream(file, file_size);
#endif
}
- return;
+ } else {
+ input = makeVOCStream(_sfxFile);
}
- int size;
- int rate;
- byte *data = loadVOCFile(_sfxFile, size, rate);
-
if (_scumm->_imuseDigital) {
- _scumm->_imuseDigital->startSound(kTalkSoundID, data, size, rate);
+ _scumm->_imuseDigital->startSound(kTalkSoundID, 0, input);
} else {
- _scumm->_mixer->playRaw(handle, data, size, rate, SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, id);
+ _scumm->_mixer->playInputStream(handle, input, false, 255, 0, id);
}
}
@@ -844,16 +846,6 @@ File *Sound::openSfxFile() {
* same directory */
offset_table = NULL;
- // FIXME / TODO / HACK: for FT voice can only be loaded from original .sou
- // files, not .so3 or .sog. This will be so until IMuseDigital gets fixed.
- if (_scumm->_imuseDigital) {
- sprintf(buf, "%s.sou", _scumm->getGameName());
- if (!file->open(buf, _scumm->getGameDataPath())) {
- file->open("monster.sou", _scumm->getGameDataPath());
- }
- return file;
- }
-
#ifdef USE_MAD
sprintf(buf, "%s.so3", _scumm->getGameName());
if (!file->open(buf, _scumm->getGameDataPath())) {