add bassflac
This commit is contained in:
parent
b927606b35
commit
c02a1e2a2f
7
audio.py
7
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():
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user