On Sun, 22 Apr 2007 18:19:12 -0400 [EMAIL PROTECTED] wrote:
>I find why it mess up, it uses uninitialized variable.
>I do not know why this happens, yet.
>
>If you start game, and just keep hit ESC fast, you will see the 
>assert.  This is fastest way to see error.  This is with latest 
>SVN 
>1162.
>
>This was not this way before, look at 2.0.2.3, and it is OK for 
>sound.  Many code changes since then, so no easy to find what part 
>
>is at faults.
>
For patch, problem is openal_track.c lines 208-213.  iSample is set 
to AL_INVALID here, but never is removed from samplelist/queue.

For a quick fix, I did below patch.  
I think no have to remove from samplelist/queue in openal_track.c 
since in audio.c, we end up removing it after this done.

(line 1029 audio.c:     // empty sample queue)

I no see harm doing patch like this, should be valid for that call, 
but not sure best way to fix openal_track.c lines 208-213.   I 
think problem might show again, just have to find trigger. :)





Index: audio.c
===================================================================
--- audio.c     (revision 1164)
+++ audio.c     (working copy)
@@ -1020,7 +1020,7 @@
        // * first
        //
        psSample = g_psSampleList;
-       while ( psSample != NULL )
+       while ( psSample != NULL && psSample->iSample != AL_INVALID )
        {
                sound_StopTrack( psSample );
                psSample = psSample->psNext;

--
Debt collectors calling your house?  Click here to consolidate into one payment.
http://tagline.hushmail.com/fc/CAaCXv1QPRSaquPG6dtUEdbIgI6FDo2Z/


_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to