shithub: orca

Download patch

ref: 99681ce7bc1589d63cd80eb11e1c9beff52e78b9
parent: ce9735c466ffca2753ebdb3e5127500dc091f0db
author: cancel <cancel@cancel.fm>
date: Tue Jan 21 19:32:27 EST 2020

Remove unused parameters for timestamping

--- a/tui_main.c
+++ b/tui_main.c
@@ -780,8 +780,7 @@
 }
 #ifdef FEAT_PORTMIDI
 enum {
-  Portmidi_artificial_latency = 20,
-  Portmidi_artificial_timestamp_offset = 0,
+  Portmidi_artificial_latency = 1,
 };
 struct {
   U64 clock_base;
@@ -984,9 +983,9 @@
                    int type /*0..15*/, int chan /*0.. 15*/,
                    int byte1 /*0..127*/, int byte2 /*0..127*/) {
 #ifdef FEAT_PORTMIDI
-  // jank af
-  PmTimestamp pm_timestamp =
-      portmidi_timestamp_now() + Portmidi_artificial_timestamp_offset;
+  // totally fake, to prevent problems with some MIDI systems getting angry if
+  // there's no timestamping info.
+  PmTimestamp pm_timestamp = portmidi_timestamp_now();
 #endif
   switch (midi_mode->any.type) {
   case Midi_mode_type_null: