[SDL] Audio callback function is not called in time sometimes
Mine
mine260309 at gmail.com
Fri Nov 30 05:33:55 PST 2007
Hi All,
I'm developing a media player using SDL, and now I met the problem that
the audio callback function is sometimes not called in time, and cause the
audio a little fitful.
I did some investigation about this problem. I use such piece of code to
open the audio device:
wanted_spec.xxx = xxx;
wanted_spec.callback = audio_callback; //audio_callback is my
audio callback function
SDL_OpenAudio(&wanted_spec, &spec);
I put some log in audio_callback function, and find that when the
phenomenon occurs the audio_callback function is not called in time, which
cause a split of the audio. And continuously not in time called
audio_callback causes the fitful sound.
My OS is Windows XP, and generally this phenomenon occurs when there're
task switches, like focus on other windows, minimum/maximum a window or
something like that. And if there's no such task switch, the sound is
smooth.
Do you know anything about that?
--
Mine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20071130/d7d7619e/attachment.html
More information about the SDL
mailing list