[SDL] Problem with mp3 playback using SDL_mixer and SMPeg.dll

Ryan C. Gordon icculus at icculus.org
Thu Jan 4 17:11:11 PST 2007


>> Only if they're nops. It's kinda hard to deschedule an interrupt.
> 
> Yeah, you've got a point there... :-D
> 
> So, the answer has to be no. The best you can do is check whether or 
> not a lock is held, and act accordingly - but that's a different 
> design entirely.

On Mac OS 9, SDL returns immediately from the hardware interrupt if 
audio lock is held, and will fill two buffers on the next interrupt 
instead of one...as long as you don't hold the audio lock for a really 
long time, this actually works fine on this platform. If you hold it too 
long, you'll get an audio skip, but that's true on any platform.

Like any other lock, don't hold it for longer than you have to...just 
twiddle some pointers and get out of there, having done the heavy 
lifting before calling LockAudio.

--ryan.






More information about the SDL mailing list