这是我到目前为止所拥有的:
private void capture()
{
var capture = new WasapiLoopbackCapture();
capture.DataAvailable += (s, a) =>
{
if (stop)
{
capture.StopRecording();
}
};
capture.RecordingStopped += (s, a) =>
{
capture.Dispose();
};
capture.StartRecording();
while (capture.CaptureState != NAudio.CoreAudioApi.CaptureState.Stopped)
{
Thread.Sleep(500);
}
}
我想对WASAPI音频捕获进行FFT,然后获取某个频带的幅度。