Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FAQ: Sound stops working after emerging KDE or GNOME.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Curious
Bodhisattva
Bodhisattva


Joined: 13 May 2002
Posts: 395
Location: Sydney, Australia

PostPosted: Wed May 22, 2002 10:50 am    Post subject: FAQ: Sound stops working after emerging KDE or GNOME. Reply with quote

Hi. This question has been asked a few times, so here's the Frequently Given Answer. ( Skip down to "The Chase" to cut the preamble )

Desktop environments generally have sounds from a variety of sources playing at any one time - sounds from the Window Manager, sounds from user programs, etc etc. Unfortunately, if these programs just accessed /dev/dsp, only one could go at a time.

You wouldn't be able to play a movie in mplayer, hear a sound from a minimised window, and hear an alert in ICQ at the same time, in short.

To fix this, GNOME and KDE implement mixer daemons ( esd, the enlightened sound daemon, and arts, the... well, arts, respectively ) - programs talk to the daemon programs, that then mix the sound streams together, and put them out to the sound card. This is great stuff. But of course, these programs block the sound card, preventing any other direct access programs from working.

The Chase:

Ok, so your sound programs don't work. First, you want to check if you have esd or artsd running:
Code:

For GNOME:
 ps -auxw | grep esd
For KDE:
 ps -auxw | grep artsd

If you come up with anything except your own grep, then this is the problem. What are you going to do about it?

Use inbuilt daemon support in the program:
Some programs understand how to talk to these daemons - an example is XMMS, which has drivers for esd and arts. You may need to consult the manual pages for these programs to find out how to set this up, or even emerge additional packages. For example, XMMS with arts requires the emerge of xmms-arts.

Use a wrapper:
Neither software creator was bold enough everyone would want to go back and rewrite their entire library to use these daemons, so a workaround was created: wrappers. The wrapper runs your sound using program, and intercepts all the calls that would normally write sound data to /dev/dsp*, translating the data and feeding it to the appropriate daemon.

There is a wrapper each for arts and esd: they are "artsdsp" and "esddsp" respectively. You run them like this:
Code:

sh-2.05a$ artsdsp mplayer -dvd 1

After a very brief pause - pow! Up pops the Usual Suspects, with sound courtesy of ARTS. :-)

Of course, these programs all have many options - to enable multithreading, turn verbose output on, etc - make sure you check what options you have available, and that some programs will not work without specific options! [1]

Good luck, and enjoy your sound!

Bryn Davies.

[1] For example, Quake 3 with artsdsp demands "-m", Memory Mapping.
_________________
Are you down with the Hawk?
Back to top
View user's profile Send private message
klieber
Administrator
Administrator


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Wed May 22, 2002 12:24 pm    Post subject: Reply with quote

Thanks for the post. I'm going to make this topic sticky for a few days to let others comment on your suggestions. Then, I'll move it into the Documentation forum (or possibly the Tips & Tricks forum)

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Tue May 28, 2002 4:32 pm    Post subject: Reply with quote

You can also set arts to autosuspend after a short period of idle time.
That way you can run anything as you usually do without arts hogging /dev/dsp.

You can set this up from KDE's contol center | Sound | Sound server.

Cehck Auto suspend if idle on set a short time (like 3 secs).

Note that if you run non-arts app, It'll hoge /dev/dsp and won't share it, but most of the time it is used to run games so no problem there :D

Don't know about esd...
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum