I am using NAudio to play music in my c++ app in VS2010:
waveOutDevice = gcnew WaveOut();
volumeStream = gcnew WaveChannel32(gcnew Mp3FileReader("C:\\file.mp3"));
mainOutputStream = volumeStream;
waveOutDevice->Init(mainOutputStream);
waveOutDevice->Play();
And it works fine, but in the end I have to make a clean up. Actually, I must dispose() IWavePlayer (waveOutDevice in the code). But Dispose() and Finalize() are not members of IWavePlayer (error C2039). If I don't dispose it, app gives me an error that WaveOut devise was not closed. How to close it?