diff options
author | Filippos Karapetis | 2008-12-31 11:46:21 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-31 11:46:21 +0000 |
commit | cae6bdac08b9deefe269c59b0d6455df8351876c (patch) | |
tree | 0429f8d5271c50d67eff7447ad35884282352626 /engines/saga | |
parent | 82b9ace2e218dbeffbcbca6327a623d347ff2678 (diff) | |
download | scummvm-rg350-cae6bdac08b9deefe269c59b0d6455df8351876c.tar.gz scummvm-rg350-cae6bdac08b9deefe269c59b0d6455df8351876c.tar.bz2 scummvm-rg350-cae6bdac08b9deefe269c59b0d6455df8351876c.zip |
Preliminary Shorten audio support for SAGA 2 games. It's still very wrong and needs further work, but it's a start
svn-id: r35626
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/saga.cpp | 1 | ||||
-rw-r--r-- | engines/saga/sndres.cpp | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index ae708fd2cf..f6249a7d0f 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -300,6 +300,7 @@ Common::Error SagaEngine::go() { syncSoundSettings(); } else { _framesEsc = 0; + //_sndRes->playVoice(0); // SAGA 2 sound test _scene->startScene(); } diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 5cf0b0a90f..243202cb6b 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -38,7 +38,7 @@ #include "sound/wave.h" #include "sound/adpcm.h" #include "sound/aiff.h" -//#include "sound/shorten.h" +#include "sound/shorten.h" #include "sound/audiostream.h" namespace Saga { @@ -370,12 +370,11 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff } break; case kSoundShorten: - /* if (Audio::loadShortenFromStream(readS, size, rate, flags)) { buffer.frequency = rate; - buffer.sampleBits = 16; - buffer.stereo = ((flags & Audio::Mixer::FLAG_STEREO) != 0); - buffer.isSigned = false; + buffer.sampleBits = (flags & Audio::Mixer::FLAG_16BITS) ? 16 : 8; + buffer.stereo = flags & Audio::Mixer::FLAG_STEREO; + buffer.isSigned = !(flags & Audio::Mixer::FLAG_UNSIGNED); buffer.size = size; if (onlyHeader) { buffer.buffer = NULL; @@ -385,7 +384,6 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff } result = true; } - */ break; case kSoundMP3: case kSoundOGG: |