gtk interface and sound playing



Hi,

I am writing a little gtk apllication and i would like to add sound to
certain events that could happen.
I use the ALSA library to play wav files but i have a  problem of
syncronization.

When i play the file, the gtk-main-loop stops.
I cannot use threads because gtk is not thread safe.
How can i play the wav file without block the gtk loop?

now i just use gtk_signal_connect(....,playwav,...)
where playwav is the function that plays wavs.

Is there a simple and clear solution for that ?

Andrea Paternesi.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]