[pulseaudio-discuss] [PATCH 2/4] move stream after default sink is changed.

Tanu Kaskinen tanuk at iki.fi
Sat Dec 22 18:57:32 UTC 2018


On Sat, 2018-12-15 at 14:48 +0800, Hui Wang wrote:
> On 2018/12/13 下午5:16, Tanu Kaskinen wrote:
> > On Mon, 2018-11-05 at 09:47 +0800, Hui Wang wrote:
> > > When default sink changes, the stream should be moved to new
> > > default_sink too.
> > Except if the stream's preferred sink is the old default sink.
> > 
> > > If it is user to call change default function,
> > > all stream will move to new default sink unconditionally; if it
> > > is not, will check if stream binds to old_default_sink and the
> > > active_port staus of old_default_sink, then it will move the
> > > stream conditionally.
> > Why does it matter if the default sink changed due to user request or
> > some other reason? I don't think streams should be moved
> > unconditionally when the user changes the default sink.
> 
> Supposing  the sink0 is hdmi, sink1 is analog-speaker,  and a music is 
> playing on sink0 (default_sink is sink0),  if users select the 
> analog-speaker from UI (gnome-sound-setting), the sink1 is default_sink 
> now, and the music should be played on sink1.  If the streams don't move 
> to new default_sink unconditionally, I have no idea how to let music be 
> played on sink1 here.

I don't see what the problem is - streams should by default move to the
new default sink, but if the user has at some point manually moved a
stream to sink0, making sink0 the preferred sink, then that stream
shouldn't be moved automatically. If the user doesn't want to keep that
old setting any more, they can move the stream manually to sink1, and
since sink1 is the default sink at this point, the preferred_sink will
be unset, so that stream will from then on behave like all other
streams.

-- 
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk



More information about the pulseaudio-discuss mailing list