diff --git a/Assets/Script/Menu/Calibrator/Calibrator.cs b/Assets/Script/Menu/Calibrator/Calibrator.cs index b3f11a770..6926e9cb0 100644 --- a/Assets/Script/Menu/Calibrator/Calibrator.cs +++ b/Assets/Script/Menu/Calibrator/Calibrator.cs @@ -43,6 +43,7 @@ private enum State private YargPlayer _player; #nullable enable private StemMixer? _mixer; + private float _time; #nullable disable private void Start() @@ -83,7 +84,7 @@ private void OnMenuInput(YargPlayer player, ref GameInput input) _audioCalibrateText.color = Color.green; _audioCalibrateText.text = "Detected"; - _calibrationTimes.Add(Time.realtimeSinceStartup); + _calibrationTimes.Add(Time.realtimeSinceStartup - _time); break; case State.Starting: case State.AudioDone: @@ -141,6 +142,7 @@ private void UpdateForState() var file = Path.Combine(Application.streamingAssetsPath, "calibration_music.ogg"); _mixer = GlobalAudioHandler.LoadCustomFile(file, SPEED, VOLUME); _mixer.Play(); + _time = Time.realtimeSinceStartup; StartCoroutine(AudioCalibrateCoroutine()); break; case State.AudioDone: