diff options
author | Paul Gilbert | 2015-05-18 20:57:58 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-18 20:57:58 -0400 |
commit | a09937121c3844071ab992115f32b47d57a5d337 (patch) | |
tree | 00c852882f76e4f3a3e7f8c18bd8544004963e22 /engines/sherlock/sound.cpp | |
parent | 8d426ca46435426c925007b08c933fdccdd75fa8 (diff) | |
download | scummvm-rg350-a09937121c3844071ab992115f32b47d57a5d337.tar.gz scummvm-rg350-a09937121c3844071ab992115f32b47d57a5d337.tar.bz2 scummvm-rg350-a09937121c3844071ab992115f32b47d57a5d337.zip |
SHERLOCK: Syntactic fixes
Diffstat (limited to 'engines/sherlock/sound.cpp')
-rw-r--r-- | engines/sherlock/sound.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/engines/sherlock/sound.cpp b/engines/sherlock/sound.cpp index 9693ccbd94..205178c0ec 100644 --- a/engines/sherlock/sound.cpp +++ b/engines/sherlock/sound.cpp @@ -30,6 +30,26 @@ namespace Sherlock { +static const int8 creativeADPCM_ScaleMap[64] = { + 0, 1, 2, 3, 4, 5, 6, 7, 0, -1, -2, -3, -4, -5, -6, -7, + 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15, + 2, 6, 10, 14, 18, 22, 26, 30, -2, -6, -10, -14, -18, -22, -26, -30, + 4, 12, 20, 28, 36, 44, 52, 60, -4, -12, -20, -28, -36, -44, -52, -60 +}; + +static const uint8 creativeADPCM_AdjustMap[64] = { + 0, 0, 0, 0, 0, 16, 16, 16, + 0, 0, 0, 0, 0, 16, 16, 16, + 240, 0, 0, 0, 0, 16, 16, 16, + 240, 0, 0, 0, 0, 16, 16, 16, + 240, 0, 0, 0, 0, 16, 16, 16, + 240, 0, 0, 0, 0, 16, 16, 16, + 240, 0, 0, 0, 0, 0, 0, 0, + 240, 0, 0, 0, 0, 0, 0, 0 +}; + +/*----------------------------------------------------------------*/ + Sound::Sound(SherlockEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) { _digitized = false; _music = false; @@ -70,24 +90,6 @@ void Sound::loadSound(const Common::String &name, int priority) { warning("loadSound"); } -static int8 creativeADPCM_ScaleMap[64] = { - 0, 1, 2, 3, 4, 5, 6, 7, 0, -1, -2, -3, -4, -5, -6, -7, - 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15, - 2, 6, 10, 14, 18, 22, 26, 30, -2, -6, -10, -14, -18, -22, -26, -30, - 4, 12, 20, 28, 36, 44, 52, 60, -4, -12, -20, -28, -36, -44, -52, -60 -}; - -static uint8 creativeADPCM_AdjustMap[64] = { - 0, 0, 0, 0, 0, 16, 16, 16, - 0, 0, 0, 0, 0, 16, 16, 16, - 240, 0, 0, 0, 0, 16, 16, 16, - 240, 0, 0, 0, 0, 16, 16, 16, - 240, 0, 0, 0, 0, 16, 16, 16, - 240, 0, 0, 0, 0, 16, 16, 16, - 240, 0, 0, 0, 0, 0, 0, 0, - 240, 0, 0, 0, 0, 0, 0, 0 -}; - byte Sound::decodeSample(byte sample, byte &reference, int16 &scale) { int16 samp = sample + scale; int16 ref = 0; |