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
|
dll = None
|
||||||
dllf = ""
|
dllf = ""
|
||||||
opus = ""
|
opus = ""
|
||||||
|
flac = ""
|
||||||
use_ctypes = False
|
use_ctypes = False
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
dllf = "bass.dll"
|
dllf = "bass.dll"
|
||||||
opus = "bassopus.dll"
|
opus = "bassopus.dll"
|
||||||
|
flac = "bassflac.dll"
|
||||||
elif platform.system() == "Darwin":
|
elif platform.system() == "Darwin":
|
||||||
dllf = "libbass.dylib"
|
dllf = "libbass.dylib"
|
||||||
opus = "libbassopus.dylib"
|
opus = "libbassopus.dylib"
|
||||||
|
flac = "libbassflas.dylib"
|
||||||
else:
|
else:
|
||||||
dllf = "libbass.so"
|
dllf = "libbass.so"
|
||||||
opus = "libbassopus.so"
|
opus = "libbassopus.so"
|
||||||
|
flac = "libbassflac.so"
|
||||||
|
|
||||||
def checkAvailable():
|
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))
|
one = os.path.exists(os.path.abspath(dllf))
|
||||||
two = os.path.exists(os.path.abspath(opus))
|
two = os.path.exists(os.path.abspath(opus))
|
||||||
|
three = os.path.exists(os.path.abspath(flac))
|
||||||
if not one: return dllf
|
if not one: return dllf
|
||||||
if not two: return two
|
if not two: return two
|
||||||
|
if not three: return three
|
||||||
return ""
|
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_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(opus), 0)
|
||||||
|
dll.BASS_PluginLoad(os.path.abspath(flac), 0)
|
||||||
|
|
||||||
def free():
|
def free():
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user