diff options
author | Nao Pross <naopross@thearcway.org> | 2018-02-27 10:37:33 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-02-27 10:37:33 +0100 |
commit | ad0f6d4291e8ca7fc60b07403a97b8661dffef72 (patch) | |
tree | 302da8c6651452b148360d009879aa3780e7fd64 /src/midi.c | |
parent | Add LaTeX PDF output to git (diff) | |
download | Xilofono-ad0f6d4291e8ca7fc60b07403a97b8661dffef72.tar.gz Xilofono-ad0f6d4291e8ca7fc60b07403a97b8661dffef72.zip |
Finalize measurement code and implement midi output
Diffstat (limited to 'src/midi.c')
-rw-r--r-- | src/midi.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -64,10 +64,12 @@ int midi_note_on(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8_ if (pkt == NULL) { return -1; } - + +#ifdef MIDI_DYNAMIC_MEMORY_ALLOC if (pkt->data == NULL) { return -2; } +#endif midi_set_status(pkt, NOTE_ON); midi_set_channel(pkt, channel); @@ -87,10 +89,12 @@ int midi_note_off(midi_message_t *pkt, unsigned channel, midi_note_t note, uint8 if (pkt == NULL) { return -1; } - + +#ifdef MIDI_DYNAMIC_MEMORY_ALLOC if (pkt->data == NULL) { return -2; } +#endif midi_set_status(pkt, NOTE_OFF); midi_set_channel(pkt, channel); |