[pulseaudio-discuss] Sending audio from source to multiple sinks dynamically

Timothy J Massey tmassey at obscorp.com
Wed Jun 17 13:08:31 PDT 2009


pulseaudio-discuss-bounces at mail.0pointer.de wrote on 06/17/2009 02:46:54 
PM:

> >> It probably wouldn't take too much to write such a module and avoids 
> >> complicated timing problems of connecting sources to sinks.
> > 
> > It's too bad that modules can't accept messages from e.g. the PA 
command 
> > line.  Because module-combine already does all of this.  It just can't 

> > change its list of slaves dynamically...
> 
> Yeah, I'm not sure ultimately if it makes more sense to reconfigure an 
> existing module-combine instance or create a whole new one, move the 
> sink-inputs and then trash the old one. The end result is likely the 
same.

Switching sinks glitches the audio on the systems I've tested with (using 
3 different systems with a variety of onboard and USB sound cards, under 
both Ubuntu 9.04 and Fedora 11).  I'd prefer not to do that.  I was hoping 
that doing everything internal to a single module would only glitch the 
sink that's being altered.  After all, it *has* to be glitched:  it is 
switching, after all...  :)

> > Another way of doing this was given to me by Matthew Patterson.  He 
used 
> > module-combine to create a single virtual sink for each sink-input 
(i.e. 
> > each instance of MPD), and included *each* physical sink in that 
virtual 
> > sink.  Then, to control what was actually playing through each 
physical 
> > sink, he would simply mute all sink-inputs for that sink, and unmute 
the 
> > one that the user selected.  The nice thing is that this should not 
glitch 
> > the audio for any sink that's not being changed.
> 
> Indeed, it's a nice approach, but not quite as dynamic as it probably 
> could be. Still, right now, this is a pretty nifty approach :)

Not as dynamic from a "throw in a new usb soundcard and go" standpoint, 
but from what I can tell, more dynamic than anything else I can do 
currently...  It seems that this is currently the best way to proceed.

Will PA perform the CPU-intensive resampling even for the muted channels? 
Or is it smart enough to know that the channel has been muted?

Tim Massey




More information about the pulseaudio-discuss mailing list