multiple programs play sound(audio) simultaneously
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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...
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)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.