Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: App crash using Naudio.

$
0
0
Hi Mark,

I thing the problem might be Waveoutbuffer.cs class .But I am not sure.
  private void WriteToWaveOut()
        {
            try
            {
                MmResult result;

                lock (waveOutLock)
                {
                    result = WaveInterop.waveOutWrite(hWaveOut, header, Marshal.SizeOf(header));
                }
              
                if (result != MmResult.NoError)
                {
                    throw new MmException(result, "waveOutWrite");
                    //GC.KeepAlive(this);
                }

                GC.KeepAlive(this);
            }
            catch (Exception ex) { obj_Global.WriteErrorLogFile("WaveOutBuffer", "WriteToWaveOut", ex.Message); }
        }
result = WaveInterop.waveOutWrite(hWaveOut, header, Marshal.SizeOf(header)) here access violation occure.But it not come immediately.Please suggest why I do?

Viewing all articles
Browse latest Browse all 5831

Latest Images

Trending Articles



Latest Images