Under load, I am getting an occasional AccessViolation in WDMAUD.DRV, and my application is crashing.
Comments: thanks. I've code reviewed WaveInBuffer again, and I can't see any issues (the Header and Data buffer structures are both pinned appropriately). I wonder whether it can sometimes be possible for WaveInBuffer.Reuse to get called after WaveInBuffer.Dispose has been called? Although I would expect waveInUnprepareHeader to have failed in that instance.
Comments: thanks. I've code reviewed WaveInBuffer again, and I can't see any issues (the Header and Data buffer structures are both pinned appropriately). I wonder whether it can sometimes be possible for WaveInBuffer.Reuse to get called after WaveInBuffer.Dispose has been called? Although I would expect waveInUnprepareHeader to have failed in that instance.