Etterna 0.74.4
Loading...
Searching...
No Matches
AdjustSync.h
1#ifndef AdjustSync_H
2#define AdjustSync_H
3
4#include <vector>
5#include <string>
6
7class TimingData;
17{
18 public:
23 static std::vector<TimingData> s_vpTimingDataOriginal;
24
25 static float s_fGlobalOffsetSecondsOriginal;
26 /* We only want to call the Reset methods before a song, not immediately
27 * after a song. If we reset it at the end of a song, we have to carefully
28 * check the logic to make sure we never reset it before the user gets a
29 * chance to save or revert the change. Resetting at the start of the song
30 * is sufficient. */
31 static void ResetOriginalSyncData();
32 static void ResetAutosync();
33 static auto IsSyncDataChanged() -> bool;
34
35 static void SaveSyncChanges();
36 static void RevertSyncChanges();
37 static void HandleAutosync(float fNoteOffBySeconds, float fStepTime);
38 static void AutosyncOffset();
39 static void GetSyncChangeTextGlobal(std::vector<std::string>& vsAddTo);
40 static void GetSyncChangeTextSong(std::vector<std::string>& vsAddTo);
41
43 static const int OFFSET_SAMPLE_COUNT = 24;
44
45 static float s_fAutosyncOffset[OFFSET_SAMPLE_COUNT];
46 static int s_iAutosyncOffsetSample;
47 static float s_fStandardDeviation;
48};
49
50#endif
Allows for adjusting the sync of a song.
Definition AdjustSync.h:17
static const int OFFSET_SAMPLE_COUNT
The minimum number of steps to hit for syncing purposes.
Definition AdjustSync.h:43
static std::vector< TimingData > s_vpTimingDataOriginal
The original TimingData before adjustments were made.
Definition AdjustSync.h:23
Holds data for translating beats<->seconds.
Definition TimingData.h:54