2424 raise ImportError ("Wine is not installed. Please install wine to use the PL2FileReader.dll" )
2525
2626 from zugbruecke import CtypesSession
27-
28- ctypes = CtypesSession (log_level = 100 )
27+ if platform .system () == "Darwin" :
28+ # On MacOS, the default log level of zugbruecke is too high
29+ ctypes = CtypesSession (log_level = 100 , arch = 'win64' )
30+ else :
31+ ctypes = CtypesSession (log_level = 100 )
2932
3033
3134class tm (ctypes .Structure ):
@@ -610,7 +613,7 @@ def pl2_get_spike_channel_info_by_name(self, channel_name):
610613
611614 self .pl2_dll .PL2_GetSpikeChannelInfoByName .argtypes = (
612615 ctypes .c_int ,
613- ctypes .c_char * len ( channel_name ),
616+ ctypes .POINTER ( ctypes . c_char ),
614617 ctypes .POINTER (PL2SpikeChannelInfo ),
615618 )
616619
@@ -624,14 +627,11 @@ def pl2_get_spike_channel_info_by_name(self, channel_name):
624627 }
625628 ]
626629
627-
628630 pl2_spike_channel_info = PL2SpikeChannelInfo ()
629- print ("---------------------" )
630- print (type (channel_name ) ,channel_name , )
631+
631632 result = self .pl2_dll .PL2_GetSpikeChannelInfoByName (
632633 self ._file_handle , channel_name , ctypes .byref (pl2_spike_channel_info )
633634 )
634- print ("----------------------------------" )
635635 if not result :
636636 self ._print_error ()
637637 return None
@@ -745,7 +745,7 @@ def pl2_get_spike_channel_data_by_name(self, channel_name):
745745
746746 self .pl2_dll .PL2_GetSpikeChannelDataByName .argtypes = (
747747 ctypes .c_int ,
748- ctypes .c_char ,
748+ ctypes .POINTER ( ctypes . c_char ) ,
749749 ctypes .POINTER (ctypes .c_ulonglong ),
750750 ctypes .POINTER (ctypes .c_ulonglong ),
751751 ctypes .POINTER (ctypes .c_ushort ),
0 commit comments