[MPlayer-users] Send audio to multiple devices
    Vladimir Mosgalin 
    mosgalin at VM10124.spb.edu
       
    Thu May 10 17:10:22 CEST 2007
    
    
  
Hi Del Corro Ramiro-ARC054!
 On 2007.05.10 at 10:45:02 -0400, Del Corro Ramiro-ARC054 wrote next:
> For example, I have 2 audio cards and one of them is the default. I want
> to send the audio to both cards at the same time. Is that possible? 
Sure it is, however you'll probably lose some features like hardware
volume control (if you card ever supported it, that is, nowadays a lot
of them don't), so software one will be used.
Use following .asoundrc (I haven't tried it, if it doesn't work, write
and I'll test it):
pcm.both {
	type plug
	slave.pcm "multi"
	ttable 0.0 1.0
	ttable 1.1 1.0
	ttable 0.2 1.0
	ttable 1.3 1.0
}
pcm.multi {
	type multi
	slaves.a.pcm "plughw:0"
	slaves.a.channels 2
	slaves.b.pcm "plughw:1"
	slaves.b.channels 2
	bindings.0.slave a
	bindings.0.channel 0
	bindings.1.slave a
	bindings.1.channel 1
	bindings.2.slave b
	bindings.2.channel 0
	bindings.3.slave b
	bindings.3.channel 1
}
ctl.multi {
	type hw
	card 0
}
then use mplayer option -ao alsa:device=both
You can make it default device, by replacing "both" with "!default". You
can also add software mixing ability, though it'll complicate things a
lot. If stereo doesn't satisfy you, look at more complex example at
http://www.sound-man.co.uk/linuxaudio/asoundrc24 and modify it to your
needs.
-- 
Vladimir
    
    
More information about the MPlayer-users
mailing list