From 1f453c6217992240d99174f03c517c3780d22d7f Mon Sep 17 00:00:00 2001 From: Evanaellio Date: Tue, 14 Sep 2021 20:26:11 +0200 Subject: [PATCH] Rename files --- main.py => __main__.py | 9 +++++---- icon_voicemeeter.png => tray_icon.png | Bin 2 files changed, 5 insertions(+), 4 deletions(-) rename main.py => __main__.py (80%) rename icon_voicemeeter.png => tray_icon.png (100%) diff --git a/main.py b/__main__.py similarity index 80% rename from main.py rename to __main__.py index ee3c4a0..0af1ea9 100644 --- a/main.py +++ b/__main__.py @@ -6,13 +6,13 @@ from PIL import Image import pystray import threading +import pkgutil kind = 'banana' voicemeeter.launch(kind) devices = AudioUtilities.GetSpeakers() -interface = devices.Activate( - IAudioEndpointVolume._iid_, CLSCTX_ALL, None) +interface = devices.Activate(IAudioEndpointVolume._iid_, CLSCTX_ALL, None) volume = cast(interface, POINTER(IAudioEndpointVolume)) VOLUME_DB_SHIFT = -15 @@ -23,7 +23,8 @@ def control_voicemeeter_volume(): while True: time.sleep(0.1) # in seconds new_volume = volume.GetMasterVolumeLevel() + VOLUME_DB_SHIFT - vmr.outputs[0].gain = new_volume + vmr.outputs[0].gain = new_volume # Output A1 + vmr.outputs[2].gain = new_volume # Output A3 def exit_app(): @@ -31,7 +32,7 @@ def exit_app(): TRAY_TOOLTIP = 'Voicemeeter Volume Control' -TRAY_ICON = 'icon_voicemeeter.png' +TRAY_ICON = 'tray_icon.png' icon = pystray.Icon(TRAY_TOOLTIP, Image.open(TRAY_ICON), menu=pystray.Menu( pystray.MenuItem('Exit ' + TRAY_TOOLTIP, exit_app) )) diff --git a/icon_voicemeeter.png b/tray_icon.png similarity index 100% rename from icon_voicemeeter.png rename to tray_icon.png