Skip to content

Commit

Permalink
fix return types for callbacks
Browse files Browse the repository at this point in the history
fluid_midi_router_handle_midi_event and fluid_synth_handle_midi_event should return c_int
  • Loading branch information
albedozero authored Sep 3, 2021
1 parent 00d1947 commit 8b03b7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fluidsynth.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class fluid_synth_channel_info_t(Structure):
('synth', c_void_p, 1),
('router', c_void_p, 1))

fluid_synth_handle_midi_event = cfunc('fluid_synth_handle_midi_event', POINTER(c_int),
fluid_synth_handle_midi_event = cfunc('fluid_synth_handle_midi_event', c_int,
('data', c_void_p, 1),
('event', c_void_p, 1))

Expand Down Expand Up @@ -404,7 +404,7 @@ class fluid_synth_channel_info_t(Structure):
# fluid midi driver
new_fluid_midi_driver = cfunc('new_fluid_midi_driver', c_void_p,
('settings', c_void_p, 1),
('handler', CFUNCTYPE(c_void_p, c_void_p, c_void_p), 1),
('handler', CFUNCTYPE(c_int, c_void_p, c_void_p), 1),
('event_handler_data', c_void_p, 1))


Expand Down Expand Up @@ -450,10 +450,10 @@ class fluid_midi_router_t(Structure):
# fluid midi router
new_fluid_midi_router = cfunc('new_fluid_midi_router', POINTER(fluid_midi_router_t),
('settings', c_void_p, 1),
('handler', CFUNCTYPE(POINTER(c_int), c_void_p, c_void_p), 1),
('handler', CFUNCTYPE(c_int, c_void_p, c_void_p), 1),
('event_handler_data', c_void_p, 1))

fluid_midi_router_handle_midi_event = cfunc('fluid_midi_router_handle_midi_event', POINTER(c_int),
fluid_midi_router_handle_midi_event = cfunc('fluid_midi_router_handle_midi_event', c_int,
('data', c_void_p, 1),
('event', c_void_p, 1))

Expand Down

0 comments on commit 8b03b7c

Please sign in to comment.