From 7ba056f0b6c3ed29eb221e0102260c412b69af24 Mon Sep 17 00:00:00 2001 From: Headshotnoby Date: Sun, 20 Jun 2021 11:11:08 -0400 Subject: [PATCH] use voidpointer on device info --- audio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio.py b/audio.py index e38caab..d3c1045 100644 --- a/audio.py +++ b/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