[pulseaudio-discuss] Potential module: persistent-sink

Chris Hamilton chamilton at cs.dal.ca
Fri Dec 5 10:34:51 PST 2008


Is it possible to have a stream stay connected to a sink, be rescued,
but then be reconnected if the sink that disappeared becomes available
once again?

Something similar to rescue-stream and always-sink, but that will try to
reconstruct the previously existing sink in the meantime.  (For example,
if it was a network sink, it'll keep trying to reconnect to the host if
it went down).

I was thinking of a use case something like:

load-module module-tunnel-sink server=someserver \
  sink_name=someserver_tunnel
load-module module-persistent-sink child=someserver_tunnel \
  sink_name=someserver

Then, streams could be directed to the 'someserver' sink, which thinly
wraps the 'someserver_tunnel'.  If the server is unable to be brought
up, or goes down, then the persistent-sink will rescue the stream by
pointing it either at the default sink or a null sink (configurable).
In the meantime, it'll continue to try and rebuild the sink that went down.

Would this be useful?  Having not really touched the PulseAudio source,
is it something that would be (somewhat easily) possible in the current
codebase?  I'm not afraid to get my hands dirty, but would appreciate a
push in the right direction.

Another unrelated question:

Is it possible to have a network sink and a local sink synchronized?  Or
multiple network sinks?  (In all cases, they have been combined using
module-combine).  I'm running 0.9.10, and use a module-esound-sink
because the module-tunnel-sink is extremely flaky (immediately get
buffer underrun complaints, and choppy sound out of the remote system).
 Using the esound sink, there is a noticeable lag between the two
systems, which one would think could be at least synchronized.  Any
feedback on this would be great.

Something that I would love to see one day (sooner rather than later):

A virtual 'switchboard' type system for configuring pipes, where
connections are drawn with the mouse, etc.  This could have a nice
graphical and intuitive switchboard (with cables, etc) view, and a
simpler more compact matrix view (inputs on one side, outputs on the
other, combiners living as both inputs and outputs).  Ideally, this
would keep information about all past clients (even though they may not
be presently active), as well as past sinks (even through they may be
down temporarily).  Status of the sinks/sources could be indicated
through color.  A 'recursive' behaviour would be nice, wherein if the
local user had access, they could zoom into the switchboard panel of a
remote server as well.  Does this sound like something anybody else
would like to see?  I can easily put together a UI mock-up illustrating
exactly what I envision...

Regards,

Chris Hamilton
(a recent but very enthusiastic PulseAudio convert)



More information about the pulseaudio-discuss mailing list