[Scummvm-cvs-logs] CVS: scummvm sound.cpp,1.68,1.69
Lionel Ulmer
bbrox at users.sourceforge.net
Wed May 1 05:58:06 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv28817
Modified Files:
sound.cpp
Log Message:
Fix the AUTOFREE problem on TheDig sounds. 'Proper' fix may come later
if I get answers on my -devel post :-)
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** sound.cpp 1 May 2002 11:39:21 -0000 1.68
--- sound.cpp 1 May 2002 12:57:12 -0000 1.69
***************
*** 682,686 ****
COMP_table table[50];
static unsigned char *CompInput, *CompOutput, *CompFinal;
- static bool initted;
int outputSize, finalSize;
--- 682,685 ----
***************
*** 704,711 ****
}
! if (!initted) {
! CompFinal = (unsigned char *)alloc(1000000);
! initted = true;
! }
finalSize = 0;
--- 703,707 ----
}
! CompFinal = (unsigned char *)malloc(1000000);
finalSize = 0;
***************
*** 750,754 ****
printf("Unknown codec %d!\n", table[i].codec);
break;
! }
memcpy(&CompFinal[finalSize], &CompOutput[0], outputSize);
--- 746,750 ----
printf("Unknown codec %d!\n", table[i].codec);
break;
! }
memcpy(&CompFinal[finalSize], &CompOutput[0], outputSize);
***************
*** 760,766 ****
/* FIXME: This is nasty. We are actually sending the whole
! decompressed packet to the mixer.. but the packet
! actually contains further subblocks! (eg, sync) */
! _mixer->play_raw(NULL, CompFinal, finalSize,22050, SoundMixer::FLAG_UNSIGNED);
}
--- 756,762 ----
/* FIXME: This is nasty. We are actually sending the whole
! decompressed packet to the mixer.. but the packet
! actually contains further subblocks! (eg, sync) */
! _mixer->play_raw(NULL, CompFinal, finalSize, 22050, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
}
More information about the Scummvm-git-logs
mailing list