aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sky/sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sky/sound.cpp b/sky/sound.cpp
index 80b0b8ce0c..93f696b5f8 100644
--- a/sky/sound.cpp
+++ b/sky/sound.cpp
@@ -1223,12 +1223,12 @@ bool SkySound::startSpeech(uint16 textNum) {
return false;
}
- uint32 speechSize = ((dataFileHeader *)speechData)->s_tot_size;
+ uint32 speechSize = ((dataFileHeader *)speechData)->s_tot_size - sizeof(dataFileHeader);
uint8 *playBuffer = (uint8 *)malloc(speechSize);
memcpy(playBuffer, speechData + sizeof(dataFileHeader), speechSize);
free(speechData);
- _spSlot = _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize - 64, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
+ _spSlot = _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
return true;
}