fix math error in level updates

This commit is contained in:
onyx-and-iris 2022-10-05 23:39:51 +01:00
parent d7df79b798
commit 732368a65b
3 changed files with 11 additions and 27 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "voicemeeter-compact"
version = "1.6.3"
version = "1.6.4"
description = "A Compact Voicemeeter Remote App"
authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT"

View File

@ -185,14 +185,9 @@ class Strip(ChannelLabelFrame):
if self.index < self.parent.parent.kind.num_strip:
if self.target.levels.is_updated:
val = max(self.target.levels.prefader)
if _base_values.vban_connected:
self.level.set(
(0 if self.mute.get() else 72 + val - 12 + self.gain.get())
)
else:
self.level.set(
(0 if self.mute.get() else 72 + val + self.gain.get())
)
class Bus(ChannelLabelFrame):
@ -213,7 +208,7 @@ class Bus(ChannelLabelFrame):
if self.index < self.parent.parent.kind.num_bus:
if self.target.levels.is_updated or self.level.get() != -118:
val = max(self.target.levels.all)
self.level.set((0 if self.mute.get() else 72 + val))
self.level.set((0 if self.mute.get() else 72 + val - 12))
class ChannelFrame(ttk.Frame):

View File

@ -154,24 +154,13 @@ class GainLayer(ttk.LabelFrame):
if self.parent.target.strip[self.index].levels.is_updated:
val = max(self.parent.target.strip[self.index].levels.prefader)
if _base_values.vban_connected:
self.level.set(
(
0
if self.parent.target.strip[self.index].mute
or not self.on.get()
if self.parent.target.strip[self.index].mute or not self.on.get()
else 72 + val - 12 + self.gain.get()
)
)
else:
self.level.set(
(
0
if self.parent.target.strip[self.index].mute
or not self.on.get()
else 72 + val + self.gain.get()
)
)
def grid_configure(self):
[