summaryrefslogtreecommitdiff
path: root/distrho/src/DistrhoUIDSSI.cpp
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2018-08-04 10:39:45 +0200
committerfalkTX <falktx@gmail.com>2018-08-04 10:39:45 +0200
commitd5c6245dcbeef164d2d767fdeead48d4bc2a0b85 (patch)
tree726ab3a97f70da253b7af3e515524db7d453fdf0 /distrho/src/DistrhoUIDSSI.cpp
parent0806803aa0cc17c1a34d651d278c2f5c6d56e507 (diff)
Allow sendNote for plugins with MIDI input
Diffstat (limited to 'distrho/src/DistrhoUIDSSI.cpp')
-rw-r--r--distrho/src/DistrhoUIDSSI.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/distrho/src/DistrhoUIDSSI.cpp b/distrho/src/DistrhoUIDSSI.cpp
index 81c6e542..5f23b836 100644
--- a/distrho/src/DistrhoUIDSSI.cpp
+++ b/distrho/src/DistrhoUIDSSI.cpp
@@ -26,6 +26,10 @@
START_NAMESPACE_DISTRHO
+#if ! DISTRHO_PLUGIN_WANT_MIDI_INPUT
+static const sendNoteFunc sendNoteCallback = nullptr;
+#endif
+
// -----------------------------------------------------------------------
struct OscData {
@@ -180,6 +184,7 @@ protected:
fOscData.send_configure(key, value);
}
+#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
void sendNote(const uint8_t channel, const uint8_t note, const uint8_t velocity)
{
if (fOscData.server == nullptr)
@@ -195,6 +200,7 @@ protected:
};
fOscData.send_midi(mdata);
}
+#endif
void setSize(const uint width, const uint height)
{
@@ -222,10 +228,12 @@ private:
uiPtr->setState(key, value);
}
+#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
static void sendNoteCallback(void* ptr, uint8_t channel, uint8_t note, uint8_t velocity)
{
uiPtr->sendNote(channel, note, velocity);
}
+#endif
static void setSizeCallback(void* ptr, uint width, uint height)
{