[+PLUS] Problem in accessing /dev/dsp
Santhosh Thottingal
santhosh00 at gmail.com
Fri Jan 5 08:52:33 IST 2007
Hi all,
For my project, I want to access the sound device to play a
sound file. Code is written in C like this
fd = open("/dev/dsp", O_RDWR);
if (fd < 0) {
perror("open of /dev/dsp failed");
exit(1);
}
The problem I am experiencing here is, if artsd (or any sound
system) is holding this device I cannot use /dev/dsp. And I cannot guess the
sound system running on the machine this program is going to run. If I kill
artsd using kill -9 command, this will work. Can you people suggest a
method to play PCM encoded sound using C code, irrespective of the sound
driver/device in all target machines(Linux)?
Thanks in advance..
Santhosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sarovar.org/pipermail/plus-discuss/attachments/20070105/99c9f48c/attachment.xhtml
More information about the PLUS-discuss
mailing list