In my Microsoft Surface application I'd like to use voice capture. So I followed the tutorial metioned here (http://opensebj.blogspot.com/2009/04/naudio-tutorial-5-recording-audio.html) and modified the NAudio.dll to be able to execute the following code:
class AudioRecording
{
private WaveMixerStream32 mixer;
public AudioRecording()
{
mixer = new WaveMixerStream32();
mixer.AutoStop = false;
}
public void start()
{
Console.WriteLine("Start recording");
mixer.StreamMixToDisk("Test.wav");
mixer.StartStreamingToDisk();
}
public void stop()
{
Console.WriteLine("Stop recording");
mixer.StopStreamingToDisk();
}
}
开发者_如何学JAVABut this doesn't really capture the sound. I just create a file of 58 bytes, that is empty. What Am I doing wrong?
Problem is sovled here:
http://naudio.codeplex.com/Thread/View.aspx?ThreadId=239825
精彩评论