LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Troubleshooting Sound (https://www.linuxquestions.org/questions/linux-general-1/troubleshooting-sound-480608/)

carlosinfl 09-05-2006 09:50 AM

Troubleshooting Sound
 
OK - My Debian Linux machine is perfect with one exception...audio/sound. I use "Audio" for 3 reasons.

- Firefox (sites like Purevolume.com and Youtube.com)
- XMMS (My audio player of choice)
- Games (I play UT2K4 & Doom3 a lot)

Now what I don't understand is why in Linux, two app's can't have sound at the same time. In XP, I can have many app's all streaming audio with no problem. Regaurdless, I don't even care that this is possible in Linux, I am just now not able to have any audio from Firefox or XMMS and have no clue how to troubleshoot something like this. Audio has always worked fine but now when I go to start XMMS, Firefox just sits there and is mute. I can close out XMMS completely & Youtube.com still has no audio for at least an hour, then something on my system releases the audio and it works...I just don't think waiting an hour is reasonable.

Any suggestions?

Andrew Benton 09-05-2006 11:15 AM

Use ALSA instead of OSS. I have no trouble playing music and video at the same time (not that I want to) because ALSA can do that. At the moment the problem is sites like Youtube use flash to play the videos and flash 7 uses OSS. That should be fixed in flash 9, whenever that is released

jens 09-05-2006 11:44 AM

As you already figured out, your sound mixer is blocking your soundsystem.
See if can kill it by doing:
Code:

killall -9 esd
(if esd is what you're using)
I'm not sure why it does work after an hour.

Flash never really worked that well for me using ALSA.
Instead, I use ALSA's OSS emulation.
To enable it type:
Code:

modprobe snd_pcm_oss
Multi-Sound streams:
ALSA also has its mixer for multiple sound streams (dmix).
I find it much easier to configure than all the other ones.
Here's a good guide to configure it:
http://alsa.opensrc.org/index.php?page=DmixPlugin
(notice you'll need to configure your apps as well for it)

Doing the above I have no problems playing any app at the same time (as for as I know).

Jens.

carlosinfl 09-05-2006 12:20 PM

Yes,

Code:

killall -9 esd
seems to free up so I can hear sound now for the 1st time in UT2004. I have never heard any sound from this game until now.

I did not know that any audio streamed via Flash7 is via OSS. I wish Macromedia would support the Linux community a bit more. We'll see when Flash 9 is released.

Thanks for your help guys!

jens 09-05-2006 01:03 PM

Quote:

Originally Posted by Carlwill
Yes,

Code:

killall -9 esd
seems to free up so I can hear sound now for the 1st time in UT2004.

Do you get good sound in UT2004 using ALSA?
That actually never worked for me (I only get blurry sound).
You normally need to force it to use OSS emulation(same thing for DOOM3 and QUAKE4):
*first run "modprobe snd_pcm_oss"
*start it like this:
Code:

ut2004-demo +set s_driver oss
(from now it will remember to keep using it)

PS: Dmix is really a very easy way to get multi sound streams.

carlosinfl 09-06-2006 09:38 AM

Ok - I don't mean to sound ignorant but I have no idea if UT2004 is using OSS or ALSA. How can I verify which sound operation the game is using. How can I determine this...I have not really tried sound yet in UT2004, I just started the game and heard sound effects during the intro...:scratch:

Code:

modprobe snd_pcm_oss
If I run the above command, can you explain what that is doing?

jens 09-06-2006 09:48 AM

It's supposed to work for both. Using ALSA, the sound is very blurry though.
"+set s_driver oss" forces it to use OSS (or OSS emulation) and will remember to keep doing so.

"snd_pcm_oss" loads kernel OSS emulation provided by ALSA.


All times are GMT -5. The time now is 11:04 AM.