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

New Post: Error :- MemoryAllocationError calling waveOutOpen while playing in a loop

$
0
0

I have a waveOut that plays inside a while loop which receives data from a udp socket.
But unfortunately it trows an error after around 30 secs saying "MemoryAllocationError calling waveOutOpen"
I use the below lines of code to achieve this.

waveOutStream = new WaveOut(); while (IsAudioTransferActive) { receivedAudioData = audioUDPClient.Receive(ref senderEP); audioDataStream = new MemoryStream(receivedAudioData); receivedRawAudioData = new RawSourceWaveStream(audioDataStream, audioFormat); waveOutStream.Init(receivedRawAudioData); waveOutStream.Play(); }
Thanks in advance.


Viewing all articles
Browse latest Browse all 5831

Trending Articles



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