diff options
author | Max Horn | 2003-06-21 19:57:56 +0000 |
---|---|---|
committer | Max Horn | 2003-06-21 19:57:56 +0000 |
commit | 9548531b1c9f0aa978822a98cc59de9fd04bb45c (patch) | |
tree | 5089fa9df346ce111e1ab857afe7ebb9d8d8bfed /scumm/smush | |
parent | 11b2961fdb99c4fec78bc63f93b745b7ec42b860 (diff) | |
download | scummvm-rg350-9548531b1c9f0aa978822a98cc59de9fd04bb45c.tar.gz scummvm-rg350-9548531b1c9f0aa978822a98cc59de9fd04bb45c.tar.bz2 scummvm-rg350-9548531b1c9f0aa978822a98cc59de9fd04bb45c.zip |
TODO: improved smush sound quality whenever 11khz sound is used
svn-id: r8585
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/imuse_channel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scumm/smush/imuse_channel.cpp b/scumm/smush/imuse_channel.cpp index 738dc01b64..526d6d5e1b 100644 --- a/scumm/smush/imuse_channel.cpp +++ b/scumm/smush/imuse_channel.cpp @@ -323,6 +323,9 @@ void ImuseChannel::getSoundData(int16 *snd, int32 size) { if (_channels == 2) size *= 2; byte * buf = (byte*)snd; if (_rate == 11025) { + // TODO / FIXME: Instead of upsampling here in the worst possible way + // (by repeating samples), we should pass the 11khz data to the mixer, + // and leave the upsampling to the mixer. for (int32 i = 0; i < size; i++) { byte sample1 = *(_sbuffer + i * 2); byte sample2 = *(_sbuffer + i * 2 + 1); @@ -352,6 +355,9 @@ void ImuseChannel::getSoundData(int8 *snd, int32 size) { if (_dataSize <= 0 || _bitsize > 8) error("invalid call to imuse_channel::read_sound_data()"); if (_channels == 2) size *= 2; if (_rate == 11025) { + // TODO / FIXME: Instead of upsampling here in the worst possible way + // (by repeating samples), we should pass the 11khz data to the mixer, + // and leave the upsampling to the mixer. for (int32 i = 0; i < size; i++) { snd[i * 2] = (int8)(((int8)(_sbuffer[i] ^ 0x80) * _volume) >> 8) ^ 0x80; snd[i * 2 + 1] = snd[i * 2]; |