Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Commented Unassigned: Incorrect Time Reported On AudioFileReader.CurrentTime Property [16414]

$
0
0
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: what type of file are you playing? (WAV, MP3...)?

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>