[pulseaudio-discuss] Sending audio from source to multiple sinks dynamically
Timothy J Massey
tmassey at obscorp.com
Wed Jun 17 09:54:02 PDT 2009
pulseaudio-discuss-bounces at mail.0pointer.de wrote on 06/17/2009 05:35:59
AM:
> On Tue, Jun 16, 2009 at 2:08 AM, Timothy J Massey <tmassey at obscorp.com>
wrote:
> > From what I can tell, with PA you can pick only which (single) sink a
> > source is connected to. If you pick a new sink for the source, it is
> > removed from whatever sink it was using before. And AFAICT, if you
want
> > to have a source play via more than one sink, the only way to do this
is
> > to create a virtual sink that is a combination of more than one sink.
Is
> > this correct? It's not really practical to create a virtual sink for
each
> > of the possible combinations of e.g. 8 different sinks...
> >
> > I'm looking for a more flexible structure. I would like to be able to
> > connect a sink to a source, and leave whatever other sinks that might
> > already be playing from that source *alone*. For example, if I'm
> > listening to MPD#1 in the living room, and I start moving between the
> > living room and the kitchen, I want to be able to select MPD#1 in the
> > kitchen *and* leave it undisturbed in the living room. Then, if
someone
> > moves into the living room and switches it to MPD#2, I want my
playback in
> > the kitchen undisturbed.
>
> There is some talk on the list once in a while about a way to connect
> sources and sinks directly, i.e. with a proper module and not
> resorting to hacks like (pacat | pacat).
>
> If someone would code such a module the zone-mixer setup would be very
> easy. Probably something like having a null sink for every MPD and the
> connecting the null sink monitor sources to any zone sink. This would
> offer the most flexibility and hopefully also without any delay
> between the different zones.
I don't know that what is needed is an entirely new module. I am assuming
that I am correct that PA allows a source to only connect to a single
sink: no one has corrected this assumption (yet).
Of course, the purpose of module-combine is to get around this limitation,
by creating a single virtual sink that then pushes the data out to
multiple slave sinks, which is *exactly* what I want to do. The only
problem is FWICT the list of slaves have to be hard-coded in advance. I
would like some way of dynamically altering the list of slaves, without
interrupting playback of the uninvolved slaves. That is the *only* thing
that is missing! :)
Is there a way to communicate with modules once they're loaded? Such as
from the PA command line?
The other thing that might allow something similar to what I'm looking for
would be the module-pipe-source/sink pair. Can multiple sources use the
same FIFO? If so, I could have each MPD app play into a unique
module-pipe-sink FIFO, and use a module-pipe-source to connect each zone's
physical sink to the appropriate FIFO. At least that way I need a more
manageable number of virtual sources (though it's still ugly)... Even
*more* hacky, module-pipe-sink could be modified to output to multiple
FIFO's if necessary, but now we're rapidly approaching the number of
permutations you would need if you used module-combine...
Tim Massey
More information about the pulseaudio-discuss
mailing list