On Thu, 21 Apr 2016 05:13:20 +0000
Mark Sims <hol...@hotmail.com> wrote:


> Well,  Lady Heather finally got off her ample ass and dug into the
> tao of X11 and all things Linuxy. 

Cool! What did you use as widget set? Or did you use xlib directly?

> One thing that will probably not be supported is sound file support... 
> playing .WAV files asynchronously does not seem to come naturally to Linux. 
> Does anybody know of a simple / lazy bastard way to play a sound file in the
> background from a C/C++ program...  I'd really like my GPS disciplined
> singing clock to work.

For simple playing, you don't need any library. Just write your wav
file directly into /dev/dsp. The usual way to use it is to have a
select() or poll() call in your main event loop and check whether
the file handle can accept more data. If you need it to be fully
asynchrounus, just fork a new process and do the loop there (adds maybe
10-20 lines or so). (dont worry about overhead here. as forking is much
cheaper on unix than on windows, forking to play a wav once in a while is
not going to hurt)


                                Attila Kinali

-- 
Reading can seriously damage your ignorance.
                -- unknown
_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to