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

New Post: MemoryAllocationError calling waveInOpen

$
0
0

I have an app that uses WaveIn to record audio. It records it in chunks... to do this, it calls:

waveIn.StartRecording()

... and then after a few seconds, it calls:

waveIn.StopRecording()

Right after it calls waveIn.StopRecording(), it allocates a new WaveIn object and calls StartRecording() on it to start recording the next chunk of audio.

Is this a reasonable approach?

What I'm finding is that occassionally, this happens when calling StartRecording():

Error while starting recording: MemoryAllocationError calling waveInOpen

at NAudio.MmException.Try(MmResult result, String function)

at NAudio.Wave.WaveIn.OpenWaveInDevice()

at NAudio.Wave.WaveIn.StartRecording()

Any thoughts on how to avoid this?


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>