ref: 9745a6a26fdae2c14961a64ad6c883472914ca4e
parent: 863c3ec94e3237a99acd83935a519813fe0c5b63
author: cancel <cancel@cancel.fm>
date: Sat Jan 25 21:01:21 EST 2020
Cleanup
--- a/tui_main.c
+++ b/tui_main.c
@@ -955,9 +955,8 @@
oevent_list_deinit(&a->oevent_list);
oevent_list_deinit(&a->scratch_oevent_list);
susnote_list_deinit(&a->susnote_list);
- if (a->oosc_dev) {
+ if (a->oosc_dev)
oosc_dev_destroy(a->oosc_dev);
- }
midi_mode_deinit(&a->midi_mode);
}
@@ -1077,8 +1076,6 @@
void send_output_events(Oosc_dev *oosc_dev, Midi_mode *midi_mode, Usz bpm,
Susnote_list *susnote_list, Oevent const *events,
Usz count) {
- double frame_secs = 60.0 / (double)bpm / 4.0;
-
enum { Midi_on_capacity = 512 };
typedef struct {
U8 channel;
@@ -1095,6 +1092,7 @@
Susnote new_susnotes[Midi_on_capacity];
Usz midi_note_count = 0;
Usz monofied_chans = 0; // bitset of channels with new mono notes
+ double frame_secs = 60.0 / (double)bpm / 4.0;
for (Usz i = 0; i < count; ++i) {
Oevent const *e = events + i;