开发者

Audio Capture is not working as expected

开发者 https://www.devze.com 2023-02-02 01:52 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消