diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2017-12-24 01:59:23 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2017-12-24 01:59:23 +0300 |
commit | f44c36856ada538d32d7eda3128c8942a194f2d9 (patch) | |
tree | 6577a54bb02143f0399f770ddc8a9066dfa06b8a | |
parent | 32e3494acae1f9fdb335e1ce143cea347a0ebf64 (diff) | |
download | libADLMIDI-f44c36856ada538d32d7eda3128c8942a194f2d9.tar.gz libADLMIDI-f44c36856ada538d32d7eda3128c8942a194f2d9.tar.bz2 libADLMIDI-f44c36856ada538d32d7eda3128c8942a194f2d9.zip |
Fixed an inability to use adlmidi.h in pure C programs
-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) |