From e8b4b2c923c13ff1cd6be6c13298105fd6b7b06d Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 11 Dec 2019 00:44:45 +0300 Subject: MidiSequencer: apply recent typo fixes and a clean-up --- src/midi_sequencer.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/midi_sequencer.h') diff --git a/src/midi_sequencer.h b/src/midi_sequencer.h index 4c6693f..64f4c47 100644 --- a/src/midi_sequencer.h +++ b/src/midi_sequencer.h @@ -23,8 +23,8 @@ */ #pragma once -#ifndef BISQUIT_AND_WOHLSTANDS_MIDI_SEQUENCER_HHHH -#define BISQUIT_AND_WOHLSTANDS_MIDI_SEQUENCER_HHHH +#ifndef BW_MIDI_SEQUENCER_HHHH +#define BW_MIDI_SEQUENCER_HHHH #ifdef __cplusplus extern "C" { @@ -52,10 +52,10 @@ typedef struct BW_MidiRtInterface /*! User data which will be passed through On-PCM-render hook */ void *onPcmRender_userData; - //! Sample rate + /*! Sample rate */ uint32_t pcmSampleRate; - //! Size of one sample in bytes + /*! Size of one sample in bytes */ uint32_t pcmFrameSize; /*! Library internal debug messages */ @@ -97,6 +97,11 @@ typedef struct BW_MidiRtInterface /*! Note-Off MIDI event hook */ RtNoteOff rt_noteOff; + /*! Note-Off MIDI event with a velocity */ + typedef void (*RtNoteOffVel)(void *userdata, uint8_t channel, uint8_t note, uint8_t velocity); + /*! Note-Off MIDI event hook with a velocity */ + RtNoteOffVel rt_noteOffVel; + /*! Note aftertouch MIDI event */ typedef void (*RtNoteAfterTouch)(void *userdata, uint8_t channel, uint8_t note, uint8_t atVal); /*! Note aftertouch MIDI event hook */ @@ -108,9 +113,9 @@ typedef struct BW_MidiRtInterface RtChannelAfterTouch rt_channelAfterTouch; /*! Controller change MIDI event */ - typedef void (*RtControlerChange)(void *userdata, uint8_t channel, uint8_t type, uint8_t value); + typedef void (*RtControllerChange)(void *userdata, uint8_t channel, uint8_t type, uint8_t value); /*! Controller change MIDI event hook */ - RtControlerChange rt_controllerChange; + RtControllerChange rt_controllerChange; /*! Patch change MIDI event */ typedef void (*RtPatchChange)(void *userdata, uint8_t channel, uint8_t patch); @@ -132,6 +137,11 @@ typedef struct BW_MidiRtInterface * Optional events * *******************/ + /*! Meta event hook */ + typedef void (*MetaEventHook)(void *userdata, uint8_t type, const uint8_t *data, size_t len); + /*! Meta event hook which catches all meta events */ + MetaEventHook rt_metaEvent; + /*! Device Switch MIDI event */ typedef void (*RtDeviceSwitch)(void *userdata, size_t track, const char *data, size_t length); /*! Device Switch MIDI event hook */ @@ -158,4 +168,4 @@ typedef struct BW_MidiRtInterface } #endif -#endif /* BISQUIT_AND_WOHLSTANDS_MIDI_SEQUENCER_HHHH */ +#endif /* BW_MIDI_SEQUENCER_HHHH */ -- cgit v1.2.3