Fix var creation level

This commit is contained in:
Logan Cusano
2025-08-01 23:49:07 -04:00
parent 46c17e55f8
commit 03eaf6887e

View File

@@ -10,9 +10,9 @@ from internal.NoiseGatev2 import NoiseGate # Assuming NoiseGatev2.py is in the s
def load_opus(): def load_opus():
"""Loads the correct opus library for the operating system.""" """Loads the correct opus library for the operating system."""
try: try:
script_dir = os.path.dirname(os.path.abspath(__file__))
if os.name == 'nt': if os.name == 'nt':
processor = platform.machine() processor = platform.machine()
script_dir = os.path.dirname(os.path.abspath(__file__))
if processor == "AMD64": if processor == "AMD64":
print("Loaded OPUS library for Windows AMD64") print("Loaded OPUS library for Windows AMD64")
discord.opus.load_opus(os.path.join(script_dir, './opus/libopus_amd64.dll')) discord.opus.load_opus(os.path.join(script_dir, './opus/libopus_amd64.dll'))