LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   XMMS sound output stopped by other programs' sounds when a song is finished (https://www.linuxquestions.org/questions/linux-software-2/xmms-sound-output-stopped-by-other-programs-sounds-when-a-song-is-finished-184915/)

ktvoelker 05-23-2004 03:20 PM

XMMS sound output stopped by other programs' sounds when a song is finished
 
I'm using XMMS to play my music. At the same time I have various other programs running, including Gaim. The sounds made by these programs, such as when users are logging on or off, is not heard while the current song is playing. But when the song stops, XMMS reports an error, complaining that another program is using the soundcard. At this point, all of the various dings Gaim wanted to make happen all in a row. The worst part of this problem, though, is that XMMS doesn't continue playing songs. I have to manually select another song for it to start. Is there any way I can help XMMS to keep exclusive access to the soundcard while it is switching songs?

nhs 05-23-2004 03:45 PM

I don't think it is possible to make XMMS keep exclusive control however if you can configure GNOME (and KDE, etc.) to send sound to /dev/null instead of /dev/dsp then it should effectively disable sound output by these programs.

A slightly outlandish idea which just occurred to me is to run XMMS from a script which renames /dev/dsp to something else just before starting XMMS. XMMS is then set up to send sound to this new name however other software will try to use the old name and fail. After XMMS quits the file is renamed back and other software regains the ability to use the soundcard. I imagine a shell script like the following might do the trick (although I haven't tested it):

#!/bin/bash
mv /dev/dsp /dev/xmms-dsp
xmms
mv /dev/xmms-dsp /dev/dsp

This might have to be SUID root in order to rename /dev/dsp depending on your setup.

chrisbkillian 05-27-2004 08:28 PM

set XMMS to use ARTS
 
I was having the same problem until a few minutes ago.

KDE uses Arts as a sound server and it locks the soundcard - so nothing can make sound while arts is on it, and arts can't when something else is on it.

select / install the arts output plugin for XMMS [not .6 as that crashes XMMS, i use .7something]

now i have GAIM sounds, email sounds, and everything - concurrently! :)

i am new at this, but i guess if you use KDE it is best to have all apps use Arts for sound output if possible. just my clueless impression.


All times are GMT -5. The time now is 05:36 AM.