Crash with AsioOut

Jul 29, 2009 at 11:04 PM

When I attempt to use AsioOut, the application crashes with the following stack track -

 

System.IndexOutOfRangeException was unhandled
  Message="Index was outside the bounds of the array."
  Source="NAudio"
  StackTrace:
       at NAudio.Wave.Asio.ASIOSampleConvertor.ConvertorShortToIntGeneric(IntPtr inputInterleavedBuffer, IntPtr[] asioOutputBuffers, Int32 nbChannels, Int32 nbSamples) in C:\Users\john\Documents\Downloads\naudio_1_2_source\naudio\NAudio\Wave\Asio\ASIOSampleConvertor.cs:line 112
       at NAudio.Wave.AsioOut.driver_BufferUpdate(IntPtr[] bufferChannels) in C:\Users\john\Documents\Downloads\naudio_1_2_source\naudio\NAudio\Wave\WaveOutputs\AsioOut.cs:line 211
       at NAudio.Wave.Asio.ASIODriverExt.BufferSwitchCallBack(Int32 doubleBufferIndex, Boolean directProcess) in C:\Users\john\Documents\Downloads\naudio_1_2_source\naudio\NAudio\Wave\Asio\ASIODriverExt.cs:line 283
  InnerException: 

I'm attempting to play a 1 Channel 48k 16bit Stream.