aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi.cpp
diff options
context:
space:
mode:
authorJP Cimalando <jpcima@users.noreply.github.com>2018-06-20 21:45:54 +0200
committerJP Cimalando <jpcima@users.noreply.github.com>2018-06-20 23:23:09 +0200
commit252e65097e9b8a815485fc03e4358698803f1a73 (patch)
tree1ece6563e49c2d82bdb453f0f0c5ce258db63874 /src/adlmidi.cpp
parent94dba775b234a57ad45dabf77200d305c94d7bf0 (diff)
downloadlibADLMIDI-252e65097e9b8a815485fc03e4358698803f1a73.tar.gz
libADLMIDI-252e65097e9b8a815485fc03e4358698803f1a73.tar.bz2
libADLMIDI-252e65097e9b8a815485fc03e4358698803f1a73.zip
basic framework of sysex handling and sequencer support
Diffstat (limited to 'src/adlmidi.cpp')
-rw-r--r--src/adlmidi.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp
index 9210b5b..e3d2326 100644
--- a/src/adlmidi.cpp
+++ b/src/adlmidi.cpp
@@ -68,6 +68,17 @@ ADLMIDI_EXPORT struct ADL_MIDIPlayer *adl_init(long sample_rate)
return midi_device;
}
+ADLMIDI_EXPORT int adl_setDeviceIdentifier(ADL_MIDIPlayer *device, unsigned id)
+{
+ if(!device || id > 0x0f)
+ return -1;
+ MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
+ if(!play)
+ return -1;
+ play->setDeviceId(id);
+ return 0;
+}
+
ADLMIDI_EXPORT int adl_setNumChips(ADL_MIDIPlayer *device, int numCards)
{
if(device == NULL)
@@ -1267,3 +1278,13 @@ ADLMIDI_EXPORT void adl_rt_bankChange(struct ADL_MIDIPlayer *device, ADL_UInt8 c
return;
player->realTime_BankChange(channel, (uint16_t)bank);
}
+
+ADLMIDI_EXPORT int adl_rt_systemExclusive(struct ADL_MIDIPlayer *device, const ADL_UInt8 *msg, unsigned size)
+{
+ if(!device)
+ return -1;
+ MIDIplay *player = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
+ if(!player)
+ return -1;
+ return player->realTime_SysEx(msg, size);
+}