This is an issue I only ran into once but I feel like it should be known. Basically when I stopped the WaveInEvent and disposed of it as my VOIP app timed out, it crashed with this error (I had to use Event Viewer to see the actual error). I believe this might be the case of no thread safety and no SafeHandle or reference count for the Interop. It's a very specific issue with a pretty specific timing to trigger even though I was stopping the WaveInEvent on the main thread.
Might be a one off issue but it could be an issue later down the track.
This is an issue I only ran into once but I feel like it should be known. Basically when I stopped the WaveInEvent and disposed of it as my VOIP app timed out, it crashed with this error (I had to use Event Viewer to see the actual error). I believe this might be the case of no thread safety and no SafeHandle or reference count for the Interop. It's a very specific issue with a pretty specific timing to trigger even though I was stopping the WaveInEvent on the main thread.
Might be a one off issue but it could be an issue later down the track.![image.png](https://github.com/naudio/NAudio/assets/69619913/c398f704-b0c4-4c5d-8d6c-92ca2ac5cf71)