From c02a1e2a2fe8856c48f23f543bb0b133a965647f Mon Sep 17 00:00:00 2001 From: cidoku Date: Fri, 14 Feb 2025 18:05:29 -0300 Subject: [PATCH] add bassflac --- audio.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/audio.py b/audio.py index 1ce87e5..dfb69b4 100644 --- a/audio.py +++ b/audio.py @@ -7,16 +7,20 @@ import ini dll = None dllf = "" opus = "" +flac = "" use_ctypes = False if platform.system() == "Windows": dllf = "bass.dll" opus = "bassopus.dll" + flac = "bassflac.dll" elif platform.system() == "Darwin": dllf = "libbass.dylib" opus = "libbassopus.dylib" + flac = "libbassflas.dylib" else: dllf = "libbass.so" opus = "libbassopus.so" + flac = "libbassflac.so" def checkAvailable(): """ @@ -25,8 +29,10 @@ Returns string with dll name if it's missing, empty if all DLLs are in place """ one = os.path.exists(os.path.abspath(dllf)) two = os.path.exists(os.path.abspath(opus)) + three = os.path.exists(os.path.abspath(flac)) if not one: return dllf if not two: return two + if not three: return three return "" @@ -45,6 +51,7 @@ Initialize BASS and the opus plugin dll.BASS_Init(ini.read_ini_int("AO2XP.ini", "Audio", "device", -1), freq, 0, 0, 0) dll.BASS_PluginLoad(os.path.abspath(opus), 0) + dll.BASS_PluginLoad(os.path.abspath(flac), 0) def free(): """