use voidpointer on device info
This commit is contained in:
parent
1d2e5ea5bc
commit
7ba056f0b6
6
audio.py
6
audio.py
@ -38,8 +38,8 @@ def init(freq=48000):
|
||||
Initialize BASS and the opus plugin
|
||||
"""
|
||||
global dll, use_ctypes
|
||||
if platform.system() == "Darwin":
|
||||
dll = ctypes.CDLL(dllf)
|
||||
if platform.system() != "Darwin":
|
||||
dll = ctypes.WinDLL(dllf)
|
||||
use_ctypes = True
|
||||
else:
|
||||
import pybass as dll
|
||||
@ -64,7 +64,7 @@ Get BASS devices
|
||||
info = ctts.BASS_DEVICEINFO() if use_ctypes else dll.BASS_DEVICEINFO()
|
||||
ind = 0
|
||||
devices = []
|
||||
while dll.BASS_GetDeviceInfo(ind, ctypes.addressof(info) if use_ctypes else info):
|
||||
while dll.BASS_GetDeviceInfo(ind, ctypes.c_voidp(ctypes.addressof(info)) if use_ctypes else info):
|
||||
devices.append(info.name)
|
||||
ind += 1
|
||||
return devices
|
||||
|
Loading…
Reference in New Issue
Block a user