RE: [AD] voice_* inside an interrupt handler [from AL]

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> > Note that this fix will probably make JGMOD work a whole lot better :-)
>
> Well note that I have NO problems whatsoever using a ming
> compiled jgmod (I
> used MSVC compiled DLL).  jgmod works in all drivers, even the DirectSound
> mixer driver, when compiled with ming.  When compiled with MSVC
> jgmod never
> works in any mode.  Therefore your fix probably won't improve JGMOD unless
> there is some sort of memory leak/race condition in Allegro that
> only showed
> up when using MSVC.

If you use an MSVC-compiled DLL, the Allegro mixer will be exactly the same.
The fact that JGMOD doesn't work on MSVC is a testament to Microsoft's
inability to create a compiler :-) I don't use MSVC myself. I use Ming a
bit, but I've never tried to use JGMOD with Ming.

JGMOD has occasionally crashed for me on DJGPP. It's also made squeaky
noises occasionally - a problem I had with the proprietary music system in
Rock 'n' Spin at one point. It's caused by the re-entrancy of the mixer.

As I explained in the original message, I believe the problem arises because
a sample pointer gets changed halfway through mixing. This would only apply
to the Allegro mixer (src/mixer.c), not the DirectSound mixer. The Allegro
mixer is re-entrant, and your timer interrupt may be called halfway through
mixing. If you then use the reallocate_voice() function on the voice
currently being mixed, the mixer may have problems mixing the rest of the
sample.

I'm going to Paris tomorrow for 3 days, so I won't be around for a while.
I'll revive the thread when I'm back :-)

Ben Davis



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/