LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-09-2006, 11:22 AM   #1
mikepol
LQ Newbie
 
Registered: Jan 2006
Posts: 8

Rep: Reputation: 0
multiple programs play sound(audio) simultaneously


Hi

I've had this problem since installing Debian. How is it possible to configure the soundcard (through Alsa or OSS) such that multiple programs can play sounds simultaneously. Some of these programs are not configurable and use /dev/dsp by default, but I still want them to play sound when other programs are using the soundcard. For example certain games don't have a configuration option for audio output and I couldn't find one for flashplayer, so whenever I want to view a video from video.google.com I have to kill all applications currently using the soundcard.

I have seen several solutions using Alsa, but they all seem to target specific programs. For example, they just indicate how to enable xmms and mplayer to play sound together, but other programs still dont work with these options (like video.google.com or vlc player). Also, I'm not using KDE or Gnome, so whatever services they have available are not solutions (unless they can be run without installing KDE or Gnome).

So how is it possible to enable multiple applications to play sounds simultaneously without configuring every single application?

Thanks in advance for answers!
 
Old 02-09-2006, 02:22 PM   #2
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
Quote:
Originally Posted by mikepol
So how is it possible to enable multiple applications to play sounds simultaneously without configuring every single application?
I don't know if it is possible... sadly. I use only apps which support alsa and so far software mixing works for all of them but the firefox flashplayer, just like you:

Quote:
I couldn't find one for flashplayer, so whenever I want to view a video from video.google.com I have to kill all applications currently using the soundcard.
Last week I wrote an email to the maintainer of the package flashplayer-mozilla, he told me that he did not face this issue. He uses kernel 2.6.15 and I'm using debian etch, that is 2.6.12. Maybe alsa is better in the newest version of the kernel? dunno...

++
 
Old 02-10-2006, 07:14 PM   #3
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
In the tutorial http://wiki.splitbrain.org/alsa, a trick is given to make the flash plugin work well with other apps.
Maybe you want to try it and give a feedback?

It does not run here:
ALSA lib timer_hw.c:269:(snd_timer_hw_open) extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)

++
 
Old 02-10-2006, 08:04 PM   #4
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
So how is it possible to enable multiple applications to play sounds simultaneously without configuring every single application?
From what I've read, OSS doesn't have the ability to play sounds simultaneously from different sound sources but ALSA has this advanced functionality. This is why OSS is depreciated in the 2.6.x version of Linux kernel and ALSA has now become the default sound system. But apparently this depends very much on the sound card you happen to have.

EDIT:
Since writing this, I've been educating myself by reading these tutorials:
http://www.linuxjournal.com/node/8234/print
http://alsa.opensrc.org/index.php?page=DmixPlugin
The dmix plugin allows "software mixing" even when the sound card doesn't support hardware mixing. But not many distros yet enable dmix by default, so one needs to set ~/.asoundrc (like explained in the above tutorials).

Last edited by Dead Parrot; 02-12-2006 at 06:20 AM.
 
Old 02-10-2006, 08:05 PM   #5
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
OOOOOhhh the solution was very easy.

aptitude install alsa-oss

Then launch firefox with "aoss firefox". No problem to hear mp3's while hearing flash.

You can also change MOZ_PROGRAM to "aoss /usr/lib/mozilla-firefox/firefox-bin" in /usr/lib/mozilla-firefox/firefox

++
 
Old 02-11-2006, 10:52 AM   #6
mikepol
LQ Newbie
 
Registered: Jan 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Hey,

Thanks for answering my post. kloss your solution works very well with flashplayer, I can now watch flash movies and don't have to kill all my other sound applications. Thanks a lot! Unfortunately aoss does not work well with all applications. Opensource game Torcs makes a screeching sound when used with aoss and audacity still tells me that the soundcard is busy even when used with aoss. But I guess I can live with that now that I got the flashplayer working.

Also, kloss, you posted this error:
ALSA lib timer_hw.c:269snd_timer_hw_open) extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)

I keep getting those each time xmms starts playing a new file. It still works fine, but somewhat annoying to see this on the terminal each time. I checked the alsa sources and they seem not to even include file timer_hw.c. Does anyone know whats causing this? Thanx.
 
Old 02-11-2006, 10:55 AM   #7
mikepol
LQ Newbie
 
Registered: Jan 2006
Posts: 8

Original Poster
Rep: Reputation: 0
The error came out with a frown in my previous post. While it should definitely accompany it, the real error is:

Code:
ALSA lib timer_hw.c:269:(snd_timer_hw_open) extended read is not supported (SNDRV_TIMER_IOCTL_TREAD)

Last edited by mikepol; 02-12-2006 at 10:58 AM.
 
Old 02-12-2006, 01:32 PM   #8
mikepol
LQ Newbie
 
Registered: Jan 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Never mind, this error disappeared when I compiled and reinstalled the newest alsa library v1.0.9.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recieving Audio From Multiple Programs At The Same Time willigiann SUSE / openSUSE 1 08-17-2005 03:25 AM
record and play simultaneously manojg Linux - Hardware 4 07-29-2005 01:18 AM
KDE blocks sound? cant play sound from other programs. Smurfen Linux - Hardware 1 04-02-2005 07:14 PM
KDE Programs cannot play ogg audio Atmchicago Linux - Software 9 11-13-2004 05:48 PM
Sound -- can't play to audio sources simultaneously d33pdream Linux - General 4 02-09-2003 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration