aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-03 15:45:09 +0000
committerTorbjörn Andersson2003-08-03 15:45:09 +0000
commita78508af332748ebaa434f41c61837ff4abec359 (patch)
tree5d31a68123f7df5946a6f4d68c5bbfc7cbfc79dc /sword2
parentc3c9fac55bab535010c6857b8e8e0587d4d2348f (diff)
downloadscummvm-rg350-a78508af332748ebaa434f41c61837ff4abec359.tar.gz
scummvm-rg350-a78508af332748ebaa434f41c61837ff4abec359.tar.bz2
scummvm-rg350-a78508af332748ebaa434f41c61837ff4abec359.zip
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. svn-id: r9433
Diffstat (limited to 'sword2')
-rw-r--r--sword2/driver/d_sound.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 5ddc6081fa..d6bb18ce6c 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -2144,7 +2144,7 @@ void Sword2Sound::UpdateSampleStreaming(void)
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 @@ int32 Sword2Sound::StreamCompMusic(const char *filename, const char *directory,
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 @@ int32 Sword2Sound::StreamCompMusic(const char *filename, const char *directory,
// 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