You are not logged in.

#1 2005-09-06 09:20:29

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

How do I know if dmix is working properly?

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

#2 2005-09-06 21:09:10

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How do I know if dmix is working properly?

Your dmix is working, I'd say.

Offline

#3 2005-09-07 15:00:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I know if dmix is working properly?

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

#4 2005-09-07 20:57:40

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How do I know if dmix is working properly?

Software mixer?

Offline

#5 2005-09-07 23:11:30

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I know if dmix is working properly?

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

#6 2005-09-08 00:15:36

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How do I know if dmix is working properly?

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

#7 2005-09-08 21:04:47

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I know if dmix is working properly?

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

#8 2005-09-08 23:48:00

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: How do I know if dmix is working properly?

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

Offline

#9 2005-09-09 21:37:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I know if dmix is working properly?

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

#10 2005-09-09 22:09:14

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How do I know if dmix is working properly?

Firefox flash plugin? Nope, just adjust the Master volume.

(Why both Xine and MPlayer? :-? )

Offline

#11 2005-09-10 00:21:57

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: How do I know if dmix is working properly?

It should be enough to make all your audio applications output on alsa.

Offline

#12 2005-09-10 14:15:50

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I know if dmix is working properly?

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.

Gullible Jones wrote:

Firefox flash plugin? Nope, just adjust the Master volume.

But that will affect all streams.

Gullible Jones wrote:

(Why both Xine and MPlayer? :-? )

Because xfmedia is a frontend to xine-lib.

IceRAM wrote:

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

#13 2005-09-10 16:55:33

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: How do I know if dmix is working properly?

There's no software mixer for Flash, unless you're viewing a flash applet(?) that has its own volume control.

Offline

Board footer

Powered by FluxBB