You are not logged in.
Following Gullible's thread on this subject, I decided I'd see what this was all about. So I started by playing two simultaneous audio streams, and found I could hear them both - without any changes to any config files etc. I figured that was alsa 1.0.9, with dmix active by default, until it was suggested that I might actually have a sound server running, like arts or esd. Well, arts is not on my system. esd is, as a dependency, but it does not show as running in
ps aux
So where does that leave me? Is my dmix OK, or is there some unseen esd trickery going on?
Offline
Your dmix is working, I'd say.
Offline
That's what I reckoned too - thanks.
So does anyone know how to change the mix with dmix i.e. control the inidividual volumes of the various sound streams? I haven't come across anything on that yet, and so far I've found that I can only alter the volume of the overall mix.
Offline
Software mixer?
Offline
You'd think, alright, but which one? alsamixer doesn't know anything about dmix, it seems. The way I think it should work is by providing a volume control for each sound-producing app, but my alsamixer display is the same regardless of how many streams are playing. The only other one I have is the xfce mixer, but it's just a GUIfied version of alsamixer - same controls, but prettier.
Offline
No, not alsamixer - software mixing. For the program you want to adjust the volume of, change the settings so that volume is "software mixer" instead of "Master" or "PCM". For MPD, for example, you'd use
mixer_type "software"
XMMS has that in its preferences somewhere. So does BMP, but BMP's didn't work last I checked. All the GNOME (and IIRC KDE) multimedia apps use software volume control by default, AFAIK.
Offline
Thanks again. I've barely scratched the surface when it comes to multimedia - I guess it shows.
I found the Software Mixer option for mplayer alright, and it works as expected. I can't find one for xfmedia, so I'll see what the developer says.
At least I know what I'm looking for now.
Offline
Go to a dir with mp3 files for example.
Run
s="song name.mp3"; p=2;
(mplayer -ao alsa "$s" &) && (sleep $p) &&
(mplayer -ao alsa "$s" &) && (sleep $p) &&
(mplayer -ao alsa "$s" &) && sleep 10 &&
killall mplayer
This should allow you to check the mixing capabilities of your alsa setup, with 3 tracks (not sure how many dmix supports). On my computer (P4 3GHz Presscot, the CPU usage was unnoticeable).
Replace
s="song name.mp3"
appropriately.
p=2 is the time in sec until a new concurent mplayer is started.
EDIT: cleaned up code
:: / my web presence
Offline
Thanks Ice. Actually, I'm happy enough with my setup now, thanks to Gullible. I ran mplayer and xine concurrently, with both of them set to use software mixing, and it worked exactly as expected. Now I just have to figure out how to configure other sound-enabled apps for software mixing, xfmedia for example. Also, things like the Firefox flash plug-in - does it even have a volume control?
Offline
Firefox flash plugin? Nope, just adjust the Master volume.
(Why both Xine and MPlayer? :-? )
Offline
It should be enough to make all your audio applications output on alsa.
:: / my web presence
Offline
Right, either I'm not making myself clear here, or else I've misunderstood what dmix is supposed to be able to do. I'm thinking that if you can play multiple sound streams, then you should also be able to adjust each stream's volume individually. Before setting mplayer to use Software Mixer, its volume control acted on all active streams - after changing the setting, it affected mplayer sound only. xfmedia's volume control still affects all streams, because as far as I can see, it doesn't have a software mixing option. I've raised it as an enhancement request on xfce's bugzilla.
Firefox flash plugin? Nope, just adjust the Master volume.
But that will affect all streams.
(Why both Xine and MPlayer? :-? )
Because xfmedia is a frontend to xine-lib.
It should be enough to make all your audio applications output on alsa.
That's what I thought too - but with xfmedia, it's not. And to get back to that flash plugin, where would I look to make sure it's set for alsa output?
Offline
There's no software mixer for Flash, unless you're viewing a flash applet(?) that has its own volume control.
Offline