This project has moved. For the latest updates, please go here.

XNA and FFT

Feb 13, 2015 at 4:13 PM
Hey all,

I'm fairly new to naudio and FFT. All I want to do is draw the waveform of the computer's speaker output (the same output I get peak volume with MMDevice.AudioMeterInformation.MasterPeakValue) to the screen. I've looked around google and everything is either poorly documented or windows forms or using about 9 million libraries. Is there any way to just draw the waveform to the screen in XNA? That's all I ask.

Thanks,
P
Coordinator
Feb 13, 2015 at 4:19 PM
hi, to draw a waveform you don't need FFT, just get the peak volume level at regular intervals. To learn how to draw things in XNA though you would be better off asking at an XNA forum I'm afraid. I've never used it myself.
Marked as answer by parzivail on 2/13/2015 at 9:38 AM
Feb 13, 2015 at 4:25 PM
Thanks. I was thinking that that would be a way to do it, but never got around to trying it. I'm already aware on how to draw things in XNA, I was just wondering about how to get the waveform.
Coordinator
Feb 13, 2015 at 4:27 PM
use WasapiLoopbackCapture to get the audio. Then examine the samples and pick out the max absolute sample value in a certain period to get a peak point to plot on your waveform