Browse Source

Cleanup

master
cancel 5 years ago
parent
commit
f1b5bedb72
  1. 9
      bank.h
  2. 3
      field.h
  3. 3
      osc_out.h
  4. 8
      tui_main.c

9
bank.h

@ -13,11 +13,7 @@ typedef struct {
typedef struct { typedef struct {
U8 oevent_type; U8 oevent_type;
U8 channel; U8 channel, octave, note, velocity, bar_divisor;
U8 octave;
U8 note;
U8 velocity;
U8 bar_divisor;
} Oevent_midi; } Oevent_midi;
enum { Oevent_osc_int_count = 16 }; enum { Oevent_osc_int_count = 16 };
@ -46,8 +42,7 @@ typedef union {
typedef struct { typedef struct {
Oevent *buffer; Oevent *buffer;
Usz count; Usz count, capacity;
Usz capacity;
} Oevent_list; } Oevent_list;
void oevent_list_init(Oevent_list *olist); void oevent_list_init(Oevent_list *olist);

3
field.h

@ -8,8 +8,7 @@
typedef struct { typedef struct {
Glyph *buffer; Glyph *buffer;
U16 height; U16 width, height;
U16 width;
} Field; } Field;
void field_init(Field *field); void field_init(Field *field);

3
osc_out.h

@ -34,8 +34,7 @@ typedef struct {
typedef struct { typedef struct {
Susnote *buffer; Susnote *buffer;
Usz count; Usz count, capacity;
Usz capacity;
} Susnote_list; } Susnote_list;
void susnote_list_init(Susnote_list *sl); void susnote_list_init(Susnote_list *sl);

8
tui_main.c

@ -311,13 +311,11 @@ void draw_grid_cursor(WINDOW *win, int draw_y, int draw_x, int draw_h,
typedef struct Undo_node { typedef struct Undo_node {
Field field; Field field;
Usz tick_num; Usz tick_num;
struct Undo_node *prev; struct Undo_node *prev, *next;
struct Undo_node *next;
} Undo_node; } Undo_node;
typedef struct { typedef struct {
Undo_node *first; Undo_node *first, *last;
Undo_node *last;
Usz count; Usz count;
Usz limit; Usz limit;
} Undo_history; } Undo_history;
@ -763,9 +761,7 @@ void midi_mode_init_osc_bidule(Midi_mode *mm, char const *path) {
PmError portmidi_init_if_necessary(void) { PmError portmidi_init_if_necessary(void) {
if (portmidi_is_initialized) if (portmidi_is_initialized)
return 0; return 0;
// U64 t0 = stm_now();
PmError e = Pm_Initialize(); PmError e = Pm_Initialize();
// fprintf(stderr, "ms: %f\n", stm_sec(stm_since(t0)) * 1000);
if (e) if (e)
return e; return e;
portmidi_is_initialized = true; portmidi_is_initialized = true;

Loading…
Cancel
Save