Skip to content

Commit

Permalink
Rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanaellio committed Sep 14, 2021
1 parent 012aead commit 1f453c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.py → __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,15 +23,16 @@ 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():
icon.stop()


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)
))
Expand Down
File renamed without changes

0 comments on commit 1f453c6

Please sign in to comment.