LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   need help with ALSA software mixing (https://www.linuxquestions.org/questions/linux-hardware-18/need-help-with-alsa-software-mixing-526623/)

r00tb33r 02-08-2007 12:20 AM

need help with ALSA software mixing
 
I am using ALSA with OSS emulation. The ALSA driver for my card is non-existent, so no hardware mixing. I would like to know how to install a software mixer and have programs use it by default so the sound card could be used simultaneously by applications... The most common problem is flash in a browser using the card and I can't play music or vice versa.
I don't know whole lot about sound on Linux so I need thorough directions.
My distro is a light version of Slackware so don't let Vector scare you.

stan.distortion 02-08-2007 12:50 AM

Im sure it is possible within alsa, the manual goes in to a lot of detail and it will be in there somewhere.
You have a few options outside of alsa though. If you are using a desktop, KDE has arts to take care of sound mixing, Gnome has gstreamer for the same and Im almost certain xfce, fluxbox, icewm, ect either use gstreamer or have there own systems.
The best of the lot (IMHO) is jack, that depends if your applications support it and (idealy) if your hardware can run jack with realtime capabilities. Also have a look at dbmix.

Hope that helps
Stan

r00tb33r 02-08-2007 01:08 AM

I really have no clue how those mixers/wrappers work.
I use Xfce, the only environment installed in Vector 5.8. I do have Arts installed since I use kmix for controls, but Arts is not configured or started. I don't know whether XMMS can use Arts - on the output plugin list it lists choices: ALSA, OSS, ESD, disk_writer. ALSA and OSS obviously work since my ALSA is just an OSS emulation.
But when either of those used my card becomes unusable by other applications... I don't know how to set up the mixers and have programs use it.
For instance lets say I have Firefox with flash running, XMMS paused in the background, and I am playing Quake 3 (ioquake3 open source, since id quake3 sound is not working and cannot be echo-ed).
Is there any way to make such scenario work?

stan.distortion 02-10-2007 05:20 AM

dmix. It should already be on your system. here is a howto:
http://alsa.opensrc.org/index.php?title=DmixPlugin
Its not an easy to understand howto,
cat ~/.asoundrc
for instance. It reads input (the cat part) from a file, starting from your home directory (the ~ part), staying in your home directory and reading the hidden (the . part) asoundrc file, the configuration file for alsa.
Easier to open it with an editor from the command line:
gedit ~/.asoundrc
Sorry for the late reply, the email notification doesnt always work for me. If your stuck and dont get a reply within a day please post again.

Cheers,
Stan

stan.distortion 02-10-2007 05:48 AM

I think quake uses oss ie. /dev/dsp for sound. There is a way to get multiple channels with /dev/dsp but for me it has always been a pain in the neck, it was easier just to stop everything else that was using sound.
Firefox uses external applications for sound and video, you will need to configure each separately.
XMMS probably has a sound plugin available for your microwave.
Check what mixer can be used with the applications you want to use, they will probably all support alsa so dmix will be the easiest.

r00tb33r 02-10-2007 10:17 PM

THANK YOU SO MUCH!!!
The above how-to does the job.
Actually it turned out easier than I thought.
I've used Linux for a couple of years and no mixing is something I thought was the small inconvenience price.
It all works now.
Btw, my Quake 3 sound mixes fine now - I use this open source port:
http://ioquake3.org/
It uses OpenAL for sound unlike the original ID version.
Its all good now, thanks again.


All times are GMT -5. The time now is 06:01 PM.