-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mp3Reader CurrentTime advancing 2x too fast??? #202
Comments
very strange, haven't seen that myself and not sure why that should happen. If you can create a small unit test that reproduces I'd be interested |
Hi @markheath Got into this today, too. Using NuGet Package 1.8.1 in my test app (VS Community 2017 15.3.0 Preview 4, C#) and also reproducible with the demo app in current master branch c7d1f54 I've attached two files containing 15 seconds of 2 channel white noise.
I've seen this with AudioFileReader and Mp3Reader. This makes no difference for me. Obviously there is a difference between the two audio formats and a problem in calculating the currentTime from Position. When playing my MP3 files I run into method NAudio.Wave.WaveStream.CurrentTime
If I would change this to
the currentTime of the MP3 file would be calculated correct, but than the calculation with the WAV file would fail ... this is not really the point. So I suppose the problem lies deeper, maybe within calculation of Position or the AverageBytesPerSecond. Maybe there is a problem with determine the audio format and therefore the wrong parametes are set? Would need a deeper dive into it. Don't know how to provide a proper unit test for this from my current view. |
worked it out. it was the fix to issue #161 causing us to double up advancing the position |
VS2015. Windows Forms. VB.NET. Playing an mp3 with total time of 2:27 as shown by mp3Reader.TotalTime (verified accurate). When the stop event is triggered, the mp3Reader.CurrentTime is shown as exactly twice the TotalTime, i.e. 4:54!!!
This happens similarly for every mp3 file I play.
Note: switched to AudioFileReader instead of mp3Reader and the problem went away.
The text was updated successfully, but these errors were encountered: