|
From: Chris G. <ch...@il...> - 2002-12-13 07:21:46
|
I'm not sure why this is, but talking with some people (the Starbase
Commander, the talking pet, the Arilou) will freeze the game every time when
trying to play certain speech files. I found out that it's because the
soundSource[SPEECH_SOURCE].sbuf_size is 0, and it just loops infinitely.
It's weird since the speech file is there, and it plays fine in Winamp. The
problem is with the same speech file every time.
Here's a quick patch. It adds a guard condition so that if there is nothing
in the sbuf, the game won't crash. It doesn't fix the underlying problem of
.oggs not playing, but it will make the game survive if some clever user
screws up their .ogg files somehow. :)
--- SNIP ---
--- trackplayer.c 2002-12-13 02:12:30.000000000 -0500
+++ trackplayer.c-new 2002-12-13 00:28:08.000000000 -0500
@@ -304,7 +304,7 @@
for (;;)
{
- if (pos >= soundSource[SPEECH_SOURCE].sbuf_size)
+ if (pos >= soundSource[SPEECH_SOURCE].sbuf_size &&
soundSource[SPEECH_SOURCE].sbuf_size > 0)
pos = pos - soundSource[SPEECH_SOURCE].sbuf_size;
else
break;
--- SNIP ---
= Chris Gahan =============
(ch...@il...)
|