Add error message when trying to use OSC MIDI without an OSC port
@@ -31,6 +31,7 @@ static void usage() {
"\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"
@@ -1034,6 +1035,14 @@ int main(int argc, char** argv) {
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);
+ }
if (osc_port != NULL) {
if (!app_set_osc_udp(&app_state, osc_hostname, osc_port)) {
fprintf(stderr, "Failed to set up OSC networking\n");
