remove MIDI support (RIP)
This commit is contained in:
parent
f49b5b08ae
commit
0f480f5c9f
9
audio.py
9
audio.py
@ -41,14 +41,13 @@ def init(freq=48000):
|
|||||||
"""
|
"""
|
||||||
Initialize BASS and the opus plugin
|
Initialize BASS and the opus plugin
|
||||||
"""
|
"""
|
||||||
global dll, bassmidi, use_ctypes
|
global dll, use_ctypes
|
||||||
if not dll:
|
if not dll:
|
||||||
if platform.system() == "Darwin":
|
if platform.system() == "Darwin":
|
||||||
dll = ctypes.CDLL(dllf)
|
dll = ctypes.CDLL(dllf)
|
||||||
use_ctypes = True
|
use_ctypes = True
|
||||||
else:
|
else:
|
||||||
import pybass as dll
|
import pybass as dll
|
||||||
import pybass.pybassmidi as bassmidi
|
|
||||||
|
|
||||||
if not dll.BASS_Init(ini.read_ini_int("AO2XP.ini", "Audio", "device", -1), freq, 0, 0, 0):
|
if not dll.BASS_Init(ini.read_ini_int("AO2XP.ini", "Audio", "device", -1), freq, 0, 0, 0):
|
||||||
print "[audio] Audio library could not be initialized. Error", getBassError()
|
print "[audio] Audio library could not be initialized. Error", getBassError()
|
||||||
@ -96,12 +95,6 @@ Load a BASS module file
|
|||||||
"""
|
"""
|
||||||
return dll.BASS_MusicLoad(mem, file, QWORD(offset), length, flags, 0)
|
return dll.BASS_MusicLoad(mem, file, QWORD(offset), length, flags, 0)
|
||||||
|
|
||||||
def loadMIDI(mem, file, offset=0, length=0, flags=0):
|
|
||||||
"""
|
|
||||||
Load a BASS stream handle
|
|
||||||
"""
|
|
||||||
return bassmidi.BASS_MIDI_StreamCreateFile(mem, file, QWORD(offset), QWORD(length), flags, 0)
|
|
||||||
|
|
||||||
def freeHandle(handle):
|
def freeHandle(handle):
|
||||||
"""
|
"""
|
||||||
Free a handle
|
Free a handle
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user