关于DSound捕捉缓冲区设置特效的问题!
正常的录音没有任何问题!
但目前想加入一些特效,特别是电流声降噪!
设置特效的代码如下:
CaptureBufferDescription CapBufferDes = new CaptureBufferDescription();
CaptureEffectDescription []CapEffDes=new CaptureEffectDescription [1];
Guid EffGUID = DSoundHelper.StandardChorusGuid;
Guid EffInstance = DSoundHelper.InterfaceEffectsChorus;
CapEffDes[0].GuidEffectsClass = EffGUID;
CapEffDes[0].GuidEffectsInstance = EffInstance;
CapBufferDes.CaptureEffectDescription = CapEffDes;
CapBufferDes.Format = theFormat;
CapBufferDes.WaveMapped = true;
CapBufferDes.ControlEffects = true;
NotifySize = 20480;
theBufferSize = NotifySize * NotifyNum;
CapBufferDes.BufferBytes = theBufferSize;
theCapBuffer = new CaptureBuffer(CapBufferDes, TheCapture);
尝试过DSoundHelper的许多特效GUID,均出错- theCapBuffer = new CaptureBuffer(CapBufferDes, TheCapture);参数值不再预期范围!参考一些文档,说是捕捉缓冲区只支持回声消除和降噪。但这两种我也设置失败!
那么这里问题我猜测有两种可能:1.缓冲区不支持 2.Guid EffInstance = DSoundHelper.InterfaceEffectsChorus;这里的GUID设置错误! 但我没能找到正确的设置方法!
请大家指教!
如果实在不行,就只好拷贝到 辅助缓冲区了 !