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

Commented Issue: WaveIn class - DataAvailable is not raised when class is used in Console Application [16131]

$
0
0
I've created own wav recording class using WaveIn, based on example from WavRecording demo. It was working perfectly when i was testing my class in the GUI application.
When I moved my code, without any change, to the console application or to the library, then it stopped working.
I've notticed that DataAvailable is never launched in these cases, so the buffer is never dumped to the wav file.
Only wav header is written to the output wav file.

I am working under Win7 x64. I compile code with .NET Framework target 3.5, Any CPU configuration.
Comments: One workaround is to put a do loop after the call to StartRecording and include the following - note the done flag is set in the event: Do Thread.Sleep(100) Windows.Forms.Application.DoEvents() Loop Until done

Viewing all articles
Browse latest Browse all 5831

Trending Articles



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