Closed OJFord closed 3 years ago
I don't exactly understand how you reproduce this. I tried disconnecting my headphones (wired) while they were active (in curSink
), and all that happened was that it swapped to my speakers (I only have headphones and speakers). Does this only happen with a single available sink?
Were you using (at least) one of --sink-nicknames-from
or --sink-nickname
s? Would be needed to hit that line.
Does your headphone sink get removed when their disconnected (not shown in pavucontrol for example), or just disabled or something perhaps?
Happens for me if the current sink is my Bluetooth earphones and I turn them off, battery dies, or I go out of range: sink switches to speakers, but instead of 'Built-in Audio Analog Stereo' it shows this error.
If the sink changes externally to
pulseaudio-control
, for example, an active bluetooth device disconnects, the output oflisten
changes toline 61: SINK_NICKNAMES["$sinkName"]="$nickname": bad array subscript
.It fixes on sink change if you rotate back through to the same one, but of course that's only a workaround, and also requires that more than one sink is still present. (If you're hitting this issue and have only one sink left, the other option is restarting the polybar.)