Commit cec96f5c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

PulseAudio: add a "?" choice if our stream moves to an unknown sink

This happens if the stream to a device that appeared after the stream
was started.
parent 7ecb5c15
......@@ -392,6 +392,16 @@ static void stream_moved_cb(pa_stream *s, void *userdata)
/* Update the variable if someone else moved our stream */
var_Change(aout, "audio-device", VLC_VAR_SETVALUE,
&(vlc_value_t){ .i_int = idx }, NULL);
/* Sink unknown as yet, create stub choice for it */
if (var_GetInteger(aout, "audio-device") != idx)
{
var_Change(aout, "audio-device", VLC_VAR_ADDCHOICE,
&(vlc_value_t){ .i_int = idx },
&(vlc_value_t){ .psz_string = (char *)"?" });
var_Change(aout, "audio-device", VLC_VAR_SETVALUE,
&(vlc_value_t){ .i_int = idx }, NULL);
}
}
static void stream_overflow_cb(pa_stream *s, void *userdata)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment