refactor: move static function on top of files
This commit is contained in:
+11
-11
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user