I'm trying to create a simple audio visualization and I'm having trouble.
Dim reader As New NAudio.Wave.Mp3FileReader(Me.OpenFileDialog.FileName)
waveStream = New BlockAlignReductionStream(WaveFormatConversionStream.CreatePcmStream(reader))
inputStream = New WaveChannel32(waveStream)
AddHandler inputStream.Sample, AddressOf OnSample
waveOut = New WaveOut()
I use that code when I open a file. It adds the handler for the Sample event, but it never gets called when I play a file. I hear audio, I just never get anything from the Sample event.