[Scummvm-cvs-logs] CVS: scummvm/scumm/smush imuse_channel.cpp,1.18,1.19
Max Horn
fingolfin at users.sourceforge.net
Sat Jun 21 12:58:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv23106/smush
Modified Files:
imuse_channel.cpp
Log Message:
TODO: improved smush sound quality whenever 11khz sound is used
Index: imuse_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/imuse_channel.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- imuse_channel.cpp 14 Jun 2003 18:52:29 -0000 1.18
+++ imuse_channel.cpp 21 Jun 2003 19:57:56 -0000 1.19
@@ -323,6 +323,9 @@
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 @@
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];
More information about the Scummvm-git-logs
mailing list