I have been using the AudioFileReader to play audio files while updating a display showing the time signature at that point in time (the app is a WPF application):
positionTime.Text = Math.Floor(_AudioFileReader.CurrentTime.TotalMinutes).ToString("00") + ":" + _AudioFileReader.CurrentTime.Seconds.ToString("00");
The time returned seems to be double the time expected so for 1 seconds worth of playback it displays 2 seconds, for 3 it displays 6 seconds and so on.
I have just upgraded to the latest version of NAudio (v1.7 29th Oct 2013) from the prerelease version and it is still showing the same problem. Your NAudioDemo (SimplePlaybackDemo) plays the file and also reports the incorrect timings. The NAudioDemo (AudioPlaybackDemo) plays the file and reports the correct timings.
The file being played is a WAV file with the format of 16 bit PCM, 48kHz, 1 channel.
Comments: somethings up with codeplex's hg servers, so I can't push at the moment, but I have a fix now
positionTime.Text = Math.Floor(_AudioFileReader.CurrentTime.TotalMinutes).ToString("00") + ":" + _AudioFileReader.CurrentTime.Seconds.ToString("00");
The time returned seems to be double the time expected so for 1 seconds worth of playback it displays 2 seconds, for 3 it displays 6 seconds and so on.
I have just upgraded to the latest version of NAudio (v1.7 29th Oct 2013) from the prerelease version and it is still showing the same problem. Your NAudioDemo (SimplePlaybackDemo) plays the file and also reports the incorrect timings. The NAudioDemo (AudioPlaybackDemo) plays the file and reports the correct timings.
The file being played is a WAV file with the format of 16 bit PCM, 48kHz, 1 channel.
Comments: somethings up with codeplex's hg servers, so I can't push at the moment, but I have a fix now