diff options
author | Wohlstand <admin@wohlnet.ru> | 2019-12-03 15:34:39 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2019-12-03 15:34:39 +0300 |
commit | c5e9ca56d446819bfd42615d2398e3817a286ef9 (patch) | |
tree | 9f536bb29b5eaf489e4f69876bfe2c76cbb78e14 /src/midi_sequencer.h | |
parent | 84af1cde8d624100b4396173688743368db64b58 (diff) | |
download | libADLMIDI-c5e9ca56d446819bfd42615d2398e3817a286ef9.tar.gz libADLMIDI-c5e9ca56d446819bfd42615d2398e3817a286ef9.tar.bz2 libADLMIDI-c5e9ca56d446819bfd42615d2398e3817a286ef9.zip |
MidiSequencer: Added PCM streaming code
This code piece should simplify a dealing with MIDI libraries
TODO: Modify some content of adl_playFormat() to use this feature
Diffstat (limited to 'src/midi_sequencer.h')
-rw-r--r-- | src/midi_sequencer.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/midi_sequencer.h b/src/midi_sequencer.h index 3f4b750..4c6693f 100644 --- a/src/midi_sequencer.h +++ b/src/midi_sequencer.h @@ -45,6 +45,19 @@ typedef struct BW_MidiRtInterface /*! User data which will be passed through On-Event hook */ void *onEvent_userData; + /*! PCM render */ + typedef void (*PcmRender)(void *userdata, uint8_t *stream, size_t length); + /*! PCM render hook which catches passing of loop start point */ + PcmRender onPcmRender; + /*! User data which will be passed through On-PCM-render hook */ + void *onPcmRender_userData; + + //! Sample rate + uint32_t pcmSampleRate; + + //! Size of one sample in bytes + uint32_t pcmFrameSize; + /*! Library internal debug messages */ typedef void (*DebugMessageHook)(void *userdata, const char *fmt, ...); /*! Debug message hook */ |