diff options
author | Max Horn | 2003-07-26 01:44:37 +0000 |
---|---|---|
committer | Max Horn | 2003-07-26 01:44:37 +0000 |
commit | 226ee61f717221bd2894dfa7d83f9d9c15c97ff5 (patch) | |
tree | a397f2d1dce697f31a0cbb24280bb1b30a1732af /sound | |
parent | ce29c4c29558b65b66e05688ac049b63ad820163 (diff) | |
download | scummvm-rg350-226ee61f717221bd2894dfa7d83f9d9c15c97ff5.tar.gz scummvm-rg350-226ee61f717221bd2894dfa7d83f9d9c15c97ff5.tar.bz2 scummvm-rg350-226ee61f717221bd2894dfa7d83f9d9c15c97ff5.zip |
oops accidentally broke the 'old' 8bit resampling code :-(
svn-id: r9192
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mixer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index 61aafb8710..4d04132822 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -432,7 +432,7 @@ protected: int a, b, c, d; public: - CubicInterpolator(int a0, int b0, int c0) : x0(2 * a0 - b0), x1(a0), x2(b0), x3(c0) { + CubicInterpolator(int8 a0, int8 b0, int8 c0) : x0(2 * a0 - b0), x1(a0), x2(b0), x3(c0) { // We use a simple linear interpolation for x0 updateCoefficients(); } @@ -445,7 +445,7 @@ public: updateCoefficients(); } - inline void feedData(int xNew) { + inline void feedData(int8 xNew) { x0 = x1; x1 = x2; x2 = x3; @@ -492,7 +492,7 @@ static void mix_signed_mono_8(int16 *data, uint &len, byte *&s, uint32 &fp_pos, do { do { - result = interp.interpolate(fp_pos) * volume / 256; + result = interp.interpolate(fp_pos) * volume; clamped_add_16(*data++, result); clamped_add_16(*data++, result); @@ -519,7 +519,7 @@ static void mix_unsigned_mono_8(int16 *data, uint &len, byte *&s, uint32 &fp_pos do { do { - result = interp.interpolate(fp_pos) * volume / 256; + result = interp.interpolate(fp_pos) * volume; clamped_add_16(*data++, result); clamped_add_16(*data++, result); @@ -552,11 +552,11 @@ static void mix_unsigned_stereo_8(int16 *data, uint &len, byte *&s, uint32 &fp_p do { do { if (!reverse_stereo) { - clamped_add_16(*data++, left.interpolate(fp_pos) * volume / 256); - clamped_add_16(*data++, right.interpolate(fp_pos) * volume / 256); + clamped_add_16(*data++, left.interpolate(fp_pos) * volume); + clamped_add_16(*data++, right.interpolate(fp_pos) * volume); } else { - clamped_add_16(*data++, right.interpolate(fp_pos) * volume / 256); - clamped_add_16(*data++, left.interpolate(fp_pos) * volume / 256); + clamped_add_16(*data++, right.interpolate(fp_pos) * volume); + clamped_add_16(*data++, left.interpolate(fp_pos) * volume); } fp_pos += fp_speed; |