refactor: move static function on top of files

This commit is contained in:
2025-11-14 11:52:47 +01:00
parent d094a6c895
commit 2692bb0f9b
5 changed files with 116 additions and 116 deletions
+11 -11
View File
@@ -25,17 +25,6 @@ static void reset_tap_chain(Tempo *tempo, long t) {
memset(tempo->tap_durations, 0, sizeof(tempo->tap_durations));
}
void tempo_init(Tempo *tempo, float value) {
long t;
t = now();
reset_tap_chain(tempo, t);
tempo->tempo = value;
tempo->beat_length = 60000.0 / value;
}
static bool is_chain_active(const Tempo tempo, long t) {
return (tempo.last_tap + MAX_BEAT_LENGTH) > t &&
(tempo.last_tap + (tempo.beat_length * BEATS_UNTIL_CHAIN_RESET)) > t;
@@ -101,6 +90,17 @@ static void add_tap_to_chain(Tempo *tempo, long t) {
tempo->tempo = 60000.0 / tempo->beat_length;
}
void tempo_init(Tempo *tempo, float value) {
long t;
t = now();
reset_tap_chain(tempo, t);
tempo->tempo = value;
tempo->beat_length = 60000.0 / value;
}
void tempo_set(Tempo *tempo, float value) {
long t;
long progress;