workaround for time jumps (they are coming from portaudio/ffmpeg stream position calculation)

This commit is contained in:
Alexander Eckart committed 2012-06-24 13:30:43 +02:00
1 parent c661bc054e
commit 157eaadf61
1 file changed
+9 -2
+9 -2
View File
@@ -218,18 +218,25 @@ namespace Vocaluxe.Base
_Player[i].SongFinished = false;
}
_OldBeatD = -100;
_Beat = -100;
_CurrentBeat = -100;
_CurrentBeatD = -100;
}
public static void UpdatePoints(float Time)
{
bool DEBUG_HIT = false;
bool DEBUG_HIT = true;
CSong song = _GameMode.GetSong();
if (song == null)
return;
_Beat = GetBeatFromTime(Time, song.BPM, song.Gap);
float b = GetBeatFromTime(Time, song.BPM, song.Gap);
if (b <= _Beat)
return;
_Beat = b;
_CurrentBeat = (int)Math.Floor(_Beat);
_MidBeatD = -0.5f + GetBeatFromTime(Time, song.BPM, song.Gap + CConfig.MicDelay/1000f);