aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi.cpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-06-22 23:39:30 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-06-22 23:39:30 +0300
commit9c69b10a7a7e7de196db45ab8f39e8be014e2fba (patch)
tree1ec5a2991af8ee08619a9765d3d516f88bdb09ba /src/adlmidi.cpp
parentb12d83a20db8c3b7bcf5d94d0ae19ab28df3ca82 (diff)
parentde7550a4cc643b37449eb791f09b625bf1af17fb (diff)
downloadlibADLMIDI-9c69b10a7a7e7de196db45ab8f39e8be014e2fba.tar.gz
libADLMIDI-9c69b10a7a7e7de196db45ab8f39e8be014e2fba.tar.bz2
libADLMIDI-9c69b10a7a7e7de196db45ab8f39e8be014e2fba.zip
Merge SysEx support branch and now we have experimental SysEx 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 efd716c..c3c07a7 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)
@@ -1330,3 +1341,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, size_t size)
+{
+ if(!device)
+ return -1;
+ MIDIplay *player = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer);
+ if(!player)
+ return -1;
+ return player->realTime_SysEx(msg, size);
+}