Good job! The problem does not seem to replicate.
I did some basic tests but it looks great so far, no crashes and it seems to be more responsive than before.
Just for information: I also tried running the stack as is without changes, before removing the pcm stream converter (WaveFormatConversionStream.CreatePcmStream()), so I had it working redundantly in the stream stack. The exception did not
appear again but another exception appeared - NullReferenceException
A first chance exception of type 'System.NullReferenceException' occurred in NAudio.dllException: System.NullReferenceException: Object reference not set to an instance of an object. at NAudio.Wave.Mp3FileReader.set_Position(Int64 value) in c:\naudio\Wave\WaveStreams\Mp3FileReader.cs:line
244 at NAudio.Wave.BlockAlignReductionStream.set_Position(Int64 value) in c:\naudio\Wave\WaveStreams\BlockAlignReductionStream.cs:line 89 at NAudio.Wave.WaveChannel32.set_Position(Int64 value) in c:\naudio\Wave\WaveStreams\WaveChannel32.cs:line
112 at NAudio.Wave.WaveStream.set_CurrentTime(TimeSpan value) in c:\naudio\Wave\WaveStreams\WaveStream.cs:line 116
This to me has a much lower priority (That stream stack is not 'Normal') , but it does suggest that class MP3FileReader might need some more fixing/sanity checks for that logic.
>> 244: mp3Stream.Position = mp3Index.FilePosition;
Anyway, thanks for taking your time to fix this show stopper!
I'll do further testing and let you know how if there's anything else.
BTW: You are welcome to check my new Open Source C# application - Practice#. It is a playback utility for practicing musicians that allows changing playback speed (without creating pitch changes) and pitch changes (without affecting speed),
which really is not a new concept, just a much better user interface and functionality IMO. The library is written in C# using NAudio and SoundTouch library (C++). It works quite nicely even at an early alpha. I decided to publish the sources
today after this show stopper to allow you usage of the utility. This is a pretty good unit tester for NAudio ;)