[Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.cpp,1.7,1.8
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Aug 3 08:46:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv3368
Modified Files:
d_sound.cpp
Log Message:
On second thought, WAVE_FORMAT_PCM probably means uncompressed WAV-data
after all, or at least not ADPCM-compressed. Updated the comments, but I
still don't know how to play it.
Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- d_sound.cpp 2 Aug 2003 02:31:36 -0000 1.7
+++ d_sound.cpp 3 Aug 2003 15:45:09 -0000 1.8
@@ -2144,7 +2144,7 @@
int32 Sword2Sound::StreamCompMusic(const char *filename, const char *directory, uint32 musicId, int32 looping) {
// FIXME: Find a good buffer size. The original code mentions three
- // seconds, but I believe that's after ADPCM-decoding.
+ // seconds.
uint32 buffer_size = 32768;
uint32 i, j;
int32 v0, v1;
@@ -2229,7 +2229,7 @@
return RDERR_OUTOFMEMORY;
}
- // Allocate a sound buffer large enough for 3 seconds
+ // Allocate a buffer for the decoded sound
data16 = (uint16 *) malloc(buffer_size);
if (!data16) {
fpMus[0].close();
@@ -2300,9 +2300,10 @@
// Start the sound effect playing
#if 0
- musicChannels[i] = _mixer->playADPCM(&musicHandle[i], lpDsbMus[i], buffer_size, 22050, SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE);
+ // FIXME: This does not work. It sounds like white noise to me.
+ musicChannels[i] = _mixer->playRaw(&musicHandle[i], lpDsbMus[i], buffer_size, 22050, SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE);
#else
- warning("FIXME: Implement ADPCM-decoding");
+ warning("FIXME: Play the sound");
free(lpDsbMus[i]);
#endif
More information about the Scummvm-git-logs
mailing list