aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/sound_he.cpp
diff options
context:
space:
mode:
authorRobin Watts2009-08-21 22:48:54 +0000
committerRobin Watts2009-08-21 22:48:54 +0000
commitf9fe1cbbcc58b74ce34bf487648acb71b8fd34ab (patch)
treed0ac47fea114ac2a549445c5f8cf99519e45b593 /engines/scumm/he/sound_he.cpp
parent978d9dfd10c8290a6123bd96dba84a5563c0f9c2 (diff)
downloadscummvm-rg350-f9fe1cbbcc58b74ce34bf487648acb71b8fd34ab.tar.gz
scummvm-rg350-f9fe1cbbcc58b74ce34bf487648acb71b8fd34ab.tar.bz2
scummvm-rg350-f9fe1cbbcc58b74ce34bf487648acb71b8fd34ab.zip
Improved comments.
svn-id: r43619
Diffstat (limited to 'engines/scumm/he/sound_he.cpp')
-rw-r--r--engines/scumm/he/sound_he.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index feaf273b4e..477f3cf0ad 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -645,6 +645,10 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags)
Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign);
sound = (char *)malloc(size * 4);
+ /* On systems where it matters, malloc will return
+ * even addresses, so the use of (void *) in the
+ * following cast shuts the compiler from warning
+ * unnecessarily. */
size = voxStream->readBuffer((int16*)(void *)sound, size * 2);
size *= 2; // 16bits.
delete voxStream;