Skip to content

Commit

Permalink
Merge pull request #1191 from peppy/fix-track-virtual
Browse files Browse the repository at this point in the history
Fix calling Reset on a TrackVirtual starting the track unexpectedly
  • Loading branch information
smoogipoo authored Nov 23, 2017
2 parents d87dab2 + 7779515 commit fe49ccb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion osu.Framework/Audio/Track/TrackVirtual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ public override bool Seek(double seek)
double current = CurrentTime;

seekOffset = seek;
lock (clock) clock.Restart();

lock (clock)
{
if (IsRunning)
clock.Restart();
else
clock.Reset();
}

if (Length > 0 && seekOffset > Length)
seekOffset = Length;
Expand Down

0 comments on commit fe49ccb

Please sign in to comment.