From ddd258a6e2985e0a0679c3378d8ec3652b2c24a2 Mon Sep 17 00:00:00 2001 From: Samuli Thomasson Date: Sun, 23 Aug 2020 08:20:46 +0200 Subject: [PATCH] support sinks with more than eight channels --- pulsemixer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulsemixer b/pulsemixer index 6b0c8c6..c921434 100755 --- a/pulsemixer +++ b/pulsemixer @@ -930,7 +930,7 @@ class PulseVolume(DebugMixin): class Bar(): # should be in correct order - LEFT, RIGHT, RLEFT, RRIGHT, CENTER, SUB, SLEFT, SRIGHT, NONE = range(9) + NONE, LEFT, RIGHT, RLEFT, RRIGHT, CENTER, SUB, SLEFT, SRIGHT = range(-1, 8) def __init__(self, pa): if type(pa) is str: @@ -1170,7 +1170,7 @@ class Screen(): if side is Bar.NONE: self.info = str return - side = 'All' if bar.locked else 'Mono' if bar.channels == 1 else self.SIDES[side] + side = 'All' if bar.locked else 'Mono' if bar.channels == 1 else self.SIDES[side] if len(self.SIDES) > side else 'AUX {}'.format(side - len(self.SIDES)) more = '↕' if bottom < self.n_lines and self.top_line_num > 0 else '↑' if self.top_line_num > 0 else '↓' if bottom < self.n_lines else ' ' name = '{}: {}'.format(bar.name, side) if len(name) > self.cols - 8: