Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 04-01-2007, 04:59 PM   #1 (permalink)
Wise Old Owl
 
desertwind's Avatar
 
Join Date: Nov 2004
Location: Hyderabad
Posts: 1,096
Default Handling /dev/dsp in C

Hi gurus,

For one of my project text2speech 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?
__________________
Sometime you'll think you understand everything

...Then you'll regain consciousness
desertwind is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 04-01-2007, 07:32 PM   #2 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,513
Default Re: Handling /dev/dsp in C

perhaps for guessing the streaming device either gstreamer or others u can include lsof
Code:
etch:~# lsof |grep /dev/dsp
esd       4437    prakash    5w      CHR       14,3                5394 /dev/dsp
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 11:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2