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: Same issue. Spent a lot of time debugging. Maybe throw an exception on StartRecording() if windows message thread is not running? Thanks for the source btw, nice work. :) Confirmed that this is the issue by adding this line to the end of Program.cs: Application.Run(new Form());
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: Same issue. Spent a lot of time debugging. Maybe throw an exception on StartRecording() if windows message thread is not running? Thanks for the source btw, nice work. :) Confirmed that this is the issue by adding this line to the end of Program.cs: Application.Run(new Form());