libffado/0001-ffado-mixer-Fix-another-Python-3.10-int-float-crash.patch
Nils Philippsen 0f2308f3e5 Fix yet another int/float crash
This time it was in the crossbar router.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2022-09-03 22:05:55 +02:00

29 lines
1.1 KiB
Diff

From 96cb4262139d3df7e3fec5b5b775c0a61248b652 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@tiptoe.de>
Date: Sat, 3 Sep 2022 00:34:39 +0200
Subject: [PATCH] ffado-mixer: Fix another Python 3.10 int/float crash
This one let switching to the crossbar router crash ffado-mixer.
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
---
libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py b/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py
index 4a67c23a..bb222889 100644
--- a/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py
+++ b/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py
@@ -53,7 +53,7 @@ class VuMeter(QFrame):
p = QPainter(self)
value = self.level/4096
r = self.rect()
- r.setHeight(r.height() * math.sqrt(value))
+ r.setHeight(int(r.height() * math.sqrt(value)))
r.moveBottom(self.rect().height())
p.fillRect(r, self.palette().highlight())
--
2.37.2