Windows phone 7 从Windows Phone中的麦克风录制,每0.1秒进行一次FFT

Windows phone 7 从Windows Phone中的麦克风录制,每0.1秒进行一次FFT,windows-phone-7,windows-phone-8,sdk,fft,Windows Phone 7,Windows Phone 8,Sdk,Fft,我需要从带有44100hz采样器的麦克风获取数据。 每0.1秒进行一次fft分析。 这是我的代码: dt.Interval = TimeSpan.FromMilliseconds(33); dt.Tick += new EventHandler(dt_Tick); dt.Start(); // Event handler for getting audio data when the buffer is full

我需要从带有44100hz采样器的麦克风获取数据。 每0.1秒进行一次fft分析。 这是我的代码:

        dt.Interval = TimeSpan.FromMilliseconds(33);
        dt.Tick += new EventHandler(dt_Tick);
        dt.Start();

        // Event handler for getting audio data when the buffer is full
        microphone.BufferReady += new EventHandler<EventArgs>(microphone_BufferReady);

        // Get audio data in 1/10 second chunks
        microphone.BufferDuration = TimeSpan.FromMilliseconds(100);

        // Allocate memory to hold the audio data
        buffer = new byte[microphone.GetSampleSizeInBytes(microphone.BufferDuration)];

        // Start recording
        microphone.Start();


    void microphone_BufferReady(object sender, EventArgs e)
    {
        // Retrieve audio data
        microphone.GetData(buffer);

        System.Diagnostics.Debug.WriteLine(buffer.Length + " " +  microphone.SampleRate);

        // ...  fft(buffer) ... some analysis
    }
如何将SampleRate更改为44100,并每0.1秒获取大小为4410或4096的缓冲区???
谢谢

不幸的是,麦克风类不支持采样率转换。无法更改Windows Phone设备上的采样率。音频播放和录制速率由OEM设置。因此,您需要自己进行采样率对话

我希望这有帮助

詹姆斯