[SDL] SDL Audio callback thread not running !

ttwu at itri.org.tw ttwu at itri.org.tw
Tue Nov 11 02:11:02 PST 2003

> code 1 WORKED well but Code 2 DIDN'T. I dont understend what's the
> difference?
> in documentation it says the callback function is a seperate running
> thread,
> but in code 2 the thread seems not running at all.

Somewhere in code 2 there's a successful call to SDL_OpenAudio(), right?

yes, but the audio output still failed .

I've traced the program, and can trace into mixaudio() once and excute
SDL_MixAudio(), then the program exited without entering mixaudio() again.

is the callback function runnging all the time and get data if data exits
, right?

it seems callback function only excute once.

is there something I should notice when writing program witj SDL audio ?

best regards!

More information about the SDL mailing list