Playing a .WAV file from a C / C++ program - Raspberry Pi Forums
i want write simple door bell program play .wav file through pi stereo audio jack when couple of gpio pins shorted together.
think i've seen information need gpio bit, what's best way play .wav or other sound file ?
(i don't mind if control returns c code when playing of .wav file starts or when ends, , don't mind if output multiple instances of whatever plays .wav file can heard @ once - indeed might rather fun.)
thanks, j/.
think i've seen information need gpio bit, what's best way play .wav or other sound file ?
(i don't mind if control returns c code when playing of .wav file starts or when ends, , don't mind if output multiple instances of whatever plays .wav file can heard @ once - indeed might rather fun.)
thanks, j/.
i did similar mp3 files , user mpg123 decoding , libao playing resulting wav. guess if want play wav need libao.
libao: http://www.xiph.org/ao/doc/
mpg123: http://www.mpg123.de/api/
problem haven't solved yet when playing sound through stereo audio port there sharp , loud click when closing audio device, or when re-opening device second time during same program execution.
luck.
steven.
libao: http://www.xiph.org/ao/doc/
mpg123: http://www.mpg123.de/api/
problem haven't solved yet when playing sound through stereo audio port there sharp , loud click when closing audio device, or when re-opening device second time during same program execution.
luck.
steven.
raspberrypi
Comments
Post a Comment