diff --git a/MusicPlayer/MusicPlayer/AudioHandler.cs b/MusicPlayer/MusicPlayer/AudioHandler.cs index 7db2e3b..f69792b 100755 --- a/MusicPlayer/MusicPlayer/AudioHandler.cs +++ b/MusicPlayer/MusicPlayer/AudioHandler.cs @@ -159,9 +159,10 @@ namespace MusicPlayer waveOut.Play(); if (CurrentSong == null || CurrentSong.Seconds == 0) - Length = ms.Length / waveOut.OutputWaveFormat.AverageBytesPerSecond; + Length = ms.Length; else Length = CurrentSong.Seconds * waveOut.OutputWaveFormat.AverageBytesPerSecond; + CurrentTime = (int)(ms.Position / waveOut.OutputWaveFormat.AverageBytesPerSecond); while (waveOut.PlaybackState != PlaybackState.Stopped)