Record from microphone in Windows Phone, FFT every 0.1 sec -


I need to get the data with a 44100 Hz sample rate from the microphone. And to do some analysis with each 0.1sec fft. My code here:

  dt.Interval = Timespan From Milliseconds (33); Dt.Tick + = new event handler (dt_Tick); Dt.Start (); The buffer is a full microphone when the // event handler to receive audio data. BufferReady + = new event handler & lt; EventArgs & gt; (Microphone Buffer Readie); // Get audio data in 1/10 second chunks of microphone. BufferDuration = Timespan From Milliseconds (100); // Allocate memory to hold audio data buffer = new byte [microphone. Gate samplinginites (microphone buffer duration)]; // recording microphone Start (); Invalid microphone buffer readie (object sender, eventAgps E) {// recover audio data microphone. Gatedata (buffer); System.Diagnostics.Debug.WriteLine (buffer length + "+ +" + microphone sampling rate); // ... fft (buffer) ... some analysis}  

I can change the sample rate for 44100 and get the buffer with size to 4410 (or 4096) each 0.1 seconds ??? Thank you

Unfortunately the microphone class does not support sample rate conversion. You can not change the sample rate on the Windows Phone device Audio playback and record rate is set by OEM. For this reason, you have to negotiate sample rate yourself

I hope it helps,

James


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -