show standard deviation
This commit is contained in:
@@ -10,6 +10,7 @@ TimingData *AdjustSync::s_pTimingDataOriginal = NULL;
|
||||
float AdjustSync::s_fGlobalOffsetSecondsOriginal = 0;
|
||||
int AdjustSync::s_iAutosyncOffsetSample = 0;
|
||||
float AdjustSync::s_fAutosyncOffset[SAMPLE_COUNT];
|
||||
float AdjustSync::s_fStandardDeviation = 0;
|
||||
|
||||
void AdjustSync::ResetOriginalSyncData()
|
||||
{
|
||||
@@ -45,6 +46,7 @@ void AdjustSync::SaveSyncChanges()
|
||||
if( s_fGlobalOffsetSecondsOriginal != PREFSMAN->m_fGlobalOffsetSeconds )
|
||||
PREFSMAN->SavePrefsToDisk();
|
||||
ResetOriginalSyncData();
|
||||
s_fStandardDeviation = 0;
|
||||
}
|
||||
|
||||
void AdjustSync::RevertSyncChanges()
|
||||
@@ -53,6 +55,7 @@ void AdjustSync::RevertSyncChanges()
|
||||
return;
|
||||
PREFSMAN->m_fGlobalOffsetSeconds.Set( s_fGlobalOffsetSecondsOriginal );
|
||||
GAMESTATE->m_pCurSong->m_Timing = *s_pTimingDataOriginal;
|
||||
s_fStandardDeviation = 0;
|
||||
}
|
||||
|
||||
static LocalizedString AUTOSYNC_CORRECTION_APPLIED ( "AdjustSync", "Autosync: Correction applied." );
|
||||
@@ -108,6 +111,7 @@ void AdjustSync::HandleAutosync( float fNoteOffBySeconds )
|
||||
}
|
||||
|
||||
s_iAutosyncOffsetSample = 0;
|
||||
s_fStandardDeviation = stddev;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
|
||||
static float s_fAutosyncOffset[SAMPLE_COUNT];
|
||||
static int s_iAutosyncOffsetSample;
|
||||
static float s_fStandardDeviation;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -100,13 +100,16 @@ void ScreenGameplaySyncMachine::ResetAndRestartCurrentSong()
|
||||
static LocalizedString OLD_OFFSET ( "ScreenGameplaySyncMachine", "Old offset" );
|
||||
static LocalizedString NEW_OFFSET ( "ScreenGameplaySyncMachine", "New offset" );
|
||||
static LocalizedString COLLECTING_SAMPLE( "ScreenGameplaySyncMachine", "Collecting sample" );
|
||||
static LocalizedString STANDARD_DEVIATION( "ScreenGameplaySyncMachine", "Standard deviation" );
|
||||
void ScreenGameplaySyncMachine::RefreshText()
|
||||
{
|
||||
float fNew = PREFSMAN->m_fGlobalOffsetSeconds;
|
||||
float fOld = AdjustSync::s_fGlobalOffsetSecondsOriginal;
|
||||
float fStdDev = AdjustSync::s_fStandardDeviation;
|
||||
RString s;
|
||||
s += OLD_OFFSET.GetValue() + ssprintf( ": %0.3f\n", fOld );
|
||||
s += NEW_OFFSET.GetValue() + ssprintf( ": %0.3f\n", fNew );
|
||||
s += STANDARD_DEVIATION.GetValue() + ssprintf( ": %0.3f\n", fStdDev );
|
||||
s += COLLECTING_SAMPLE.GetValue() + ssprintf( ": %d / %d", AdjustSync::s_iAutosyncOffsetSample+1, SAMPLE_COUNT );
|
||||
|
||||
m_textSyncInfo.SetText( s );
|
||||
|
||||
Reference in New Issue
Block a user