'Twas brillig, and Timothy J Massey at 28/06/09 22:09 did gyre and gimble:
Hello!

Still working on my multi-zone setup. The goal is to have multiple instances of MPD playing, and being able to be routed to 0 or more zones simultaneously. Each player is connected to a unique sink created with module-combine, with each of these combined sinks including *all* of the physical sinks. Something like this:

#Physical sinks for actual hardware
load-module module-alsa-sink device=hw:1,0 sink_name=zone1
load-module module-alsa-sink device=hw:2,0 sink_name=zone2 load-module module-alsa-sink device=hw:3,0 sink_name=zone3 #Module-combine sinks for handling each MPD
load-module module-combine sink_name=mpdplayer1 slaves=zone1,zone2,zone3
load-module module-combine sink_name=mpdplayer2 slaves=zone1,zone2,zone3
load-module module-combine sink_name=mpdplayer3 slaves=zone1,zone2,zone3

For now, I have a single instance of MPD playing through sink mpdplayer1. When I start up MPD and play something, I get audio out of all three sinks. So far, so good.

Now, though, I would like to mute the sound in all but one of the zones. I can't simply do something like:

set-sink-mute zone2
set-sink-mute zone3

Because that would mute the outputs for those zones, and they might be (and likely are) playing music from one of the other MPD sessions. What I want to do is tell the module-combined sink (mpdplayer1) to only send audio to one of the sinks and to mute the output to the other two sinks.

Is this possible? I cant seem to find a way to interact with the individual channels within a module-combine...

The only way I can think of to do this right now is to create nine remapped sinks of the real alsa sinks. one for each player instance in each zone.

So you'de have something like:
load-module module-remap-sink sink_name="mpdplayer1zone1" master="zone1"
load-module module-remap-sink sink_name="mpdplayer1zone2" master="zone2"
load-module module-remap-sink sink_name="mpdplayer1zone3" master="zone3"

load-module module-remap-sink sink_name="mpdplayer2zone1" master="zone1"
load-module module-remap-sink sink_name="mpdplayer2zone2" master="zone2"
load-module module-remap-sink sink_name="mpdplayer2zone3" master="zone3"

load-module module-remap-sink sink_name="mpdplayer3zone1" master="zone1"
load-module module-remap-sink sink_name="mpdplayer3zone2" master="zone2"
load-module module-remap-sink sink_name="mpdplayer3zone3" master="zone3"

load-module module-combine sink_name=mpdplayer1 slaves=mpdplayer1zone1,mpdplayer1zone2,mpdplayer1zone3 load-module module-combine sink_name=mpdplayer2 slaves=mpdplayer2zone1,mpdplayer2zone2,mpdplayer2zone3 load-module module-combine sink_name=mpdplayer3 slaves=mpdplayer3zone1,mpdplayer3zone2,mpdplayer3zone3


This maybe a little crazy and I don't know how much load/interference this could cause.

But I guess you can then mute the remapped sink and get what you want. Only thing I don't know is if muting a remapped sink will just pass the mute signal along to the master sink in which case this will be kinda useless :s

Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to