select() is the best way to keep from blocking, at least if you’re not going to 
use threads or sub-processes.

Unless you’re going to support one or more of the intermediate sound libraries 
(ALSA comes to mind), then playing a sound involves opening a device, using 
ioctl()s to set the format and rate and the like, and then writing the samples 
out and closing, which takes me back to select().

> On Apr 20, 2016, at 10:13 PM, 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.   The program is currently working well enough to 
> display log files, etc.  Serial port initialization for non-blocking 
> asynchronous I/O needs to be completed.   I have it working on a couple of 
> Ubuntu Mate boxes  (X86 and Mac Mini power pc G4) and a Raspberry Pi 3.  I 
> need to tweak the Pi color palette initialization code... the bastards 
> defaulted it to a 16 bit RGB 565 frame buffer...
> 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.
> 
>                                         
> _______________________________________________
> 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.

_______________________________________________
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