diff options
-rw-r--r-- | include/adlmidi.h | 2 | ||||
-rw-r--r-- | src/adlmidi.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/adlmidi.h b/include/adlmidi.h index 49dcbc0..29e2fab 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -222,7 +222,7 @@ extern void adl_panic(struct ADL_MIDIPlayer *device); extern void adl_rt_resetState(struct ADL_MIDIPlayer *device); /*Turn specific MIDI note ON*/ -extern bool adl_rt_noteOn(struct ADL_MIDIPlayer *device, ADL_UInt8 channel, ADL_UInt8 note, ADL_UInt8 velocity); +extern int adl_rt_noteOn(struct ADL_MIDIPlayer *device, ADL_UInt8 channel, ADL_UInt8 note, ADL_UInt8 velocity); /*Turn specific MIDI note OFF*/ extern void adl_rt_noteOff(struct ADL_MIDIPlayer *device, ADL_UInt8 channel, ADL_UInt8 note); diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp index 3ad4508..7394424 100644 --- a/src/adlmidi.cpp +++ b/src/adlmidi.cpp @@ -749,14 +749,14 @@ ADLMIDI_EXPORT void adl_rt_resetState(struct ADL_MIDIPlayer *device) player->realTime_ResetState(); } -ADLMIDI_EXPORT bool adl_rt_noteOn(struct ADL_MIDIPlayer *device, ADL_UInt8 channel, ADL_UInt8 note, ADL_UInt8 velocity) +ADLMIDI_EXPORT int adl_rt_noteOn(struct ADL_MIDIPlayer *device, ADL_UInt8 channel, ADL_UInt8 note, ADL_UInt8 velocity) { if(!device) - return false; + return 0; MIDIplay *player = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer); if(!player) - return false; - return player->realTime_NoteOn(channel, note, velocity); + return 0; + return (int)player->realTime_NoteOn(channel, note, velocity); } ADLMIDI_EXPORT void adl_rt_noteOff(struct ADL_MIDIPlayer *device, ADL_UInt8 channel, ADL_UInt8 note) |