From 7f65c190441af106b9b5d039e2526d96c9bfe9c7 Mon Sep 17 00:00:00 2001 From: mcmartin Date: Sun, 6 Apr 2008 07:50:42 +0000 Subject: [PATCH] Fixed intermittent crash if conversing with music disabled git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2959 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/libs/sound/trackplayer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 9ef396b2d..6bddd1fc5 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Fixed a crash when conversing with music disabled - Michael - Moved all resources into starcon.ls2 - Michael - Fixed compile errors when compiling without joystick support - Michael - Added endian-aware integer read functions to uio - SvdB diff --git a/sc2/src/sc2code/libs/sound/trackplayer.c b/sc2/src/sc2code/libs/sound/trackplayer.c index 6c40014fe..953bb039e 100644 --- a/sc2/src/sc2code/libs/sound/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/trackplayer.c @@ -850,7 +850,7 @@ GetSoundData (void *data) // Using step of 1 sample at 11025Hz, because the human speech // is mostly in the low frequencies - step = soundSource[MUSIC_SOURCE].sample->decoder->frequency * 2 / 11025; + step = soundSource[SPEECH_SOURCE].sample->decoder->frequency * 2 / 11025; step = (step + 1) & ~1; if (delta < 0)