fix: build warnings
This commit is contained in:
@@ -287,6 +287,7 @@ bool state_background_midi_write(SharedContext *context,
|
|||||||
update_values(context, state_config, midi);
|
update_values(context, state_config, midi);
|
||||||
|
|
||||||
last_active = false;
|
last_active = false;
|
||||||
|
last_change = false;
|
||||||
|
|
||||||
while (!context->stop) {
|
while (!context->stop) {
|
||||||
beat_active = tempo_progress(context->tempo, 1.0) < 0.25;
|
beat_active = tempo_progress(context->tempo, 1.0) < 0.25;
|
||||||
|
|||||||
+4
-4
@@ -36,13 +36,13 @@ Tempo tempo_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool is_chain_active(Tempo tempo, long t) {
|
static bool is_chain_active(Tempo tempo, long t) {
|
||||||
return tempo.last_tap + MAX_BEAT_LENGTH > t &&
|
return (tempo.last_tap + MAX_BEAT_LENGTH) > t &&
|
||||||
tempo.last_tap + (tempo.beat_length * BEATS_UNTIL_CHAIN_RESET) > t;
|
(tempo.last_tap + (tempo.beat_length * BEATS_UNTIL_CHAIN_RESET)) > t;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long get_average_tap_duration(Tempo tempo) {
|
static long get_average_tap_duration(Tempo tempo) {
|
||||||
unsigned int amount, i;
|
unsigned int amount, i;
|
||||||
unsigned long running_total, average_tap_duration;
|
long running_total, average_tap_duration;
|
||||||
|
|
||||||
amount = tempo.taps_in_chain - 1;
|
amount = tempo.taps_in_chain - 1;
|
||||||
if (amount > TOTAL_TAP_VALUES) {
|
if (amount > TOTAL_TAP_VALUES) {
|
||||||
|
|||||||
+1
-1
@@ -136,7 +136,7 @@ typedef struct Tempo {
|
|||||||
unsigned int tap_duration_index;
|
unsigned int tap_duration_index;
|
||||||
unsigned int tap_durations[MAX_TAP_VALUES];
|
unsigned int tap_durations[MAX_TAP_VALUES];
|
||||||
bool last_tap_skipped;
|
bool last_tap_skipped;
|
||||||
unsigned long beat_length;
|
long beat_length;
|
||||||
float tempo;
|
float tempo;
|
||||||
} Tempo;
|
} Tempo;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user