shithub: orca

Download patch

ref: 114a1954fb9577066556a196b7b8881590b3dd17
parent: 4d0f63a0313f02c7c89214e2d1eb9392d5deb239
author: cancel <cancel@cancel.fm>
date: Sun Dec 9 20:27:31 EST 2018

Add error message when trying to use OSC MIDI without an OSC port

--- a/tui_main.c
+++ b/tui_main.c
@@ -31,6 +31,7 @@
       "\n"
       "    --osc-port <number or service name>\n"
       "        UDP port (or service name) to send OSC messages to.\n"
+      "        This option must be set for OSC output to be enabled.\n"
       "        Default: none\n"
       "\n"
       "    --osc-midi-bidule <path>\n"
@@ -1030,6 +1031,14 @@
     fprintf(stderr,
             "An OSC server address was specified, but no OSC port was "
             "specified.\n"
+            "OSC output is not possible without specifying an OSC port.\n");
+    app_deinit(&app_state);
+    exit(1);
+  }
+  if (midi_mode.any.type == Midi_mode_type_osc_bidule && osc_port == NULL) {
+    fprintf(stderr,
+            "MIDI was set to be sent via OSC formatted for Plogue Bidule,\n"
+            "but no OSC port was specified.\n"
             "OSC output is not possible without specifying an OSC port.\n");
     app_deinit(&app_state);
     exit(1);