Ios 用奴佛卡因进行有源噪声消除
出于有源噪声消除的目的,我如何使用奴佛卡因生成反相信号?也就是说,在Ios 用奴佛卡因进行有源噪声消除,ios,macos,core-audio,novocaine,Ios,Macos,Core Audio,Novocaine,出于有源噪声消除的目的,我如何使用奴佛卡因生成反相信号?也就是说,在NovocaineOutputBlock中,如何生成与输入相差180度的输出 以下是我目前的代码: __weak AppDelegate * wself = self; self.ringBuffer = new RingBuffer(32768, 2); self.audioManager = [Novocaine audioManager]; [self.audioManager setInputBlock:^(floa
NovocaineOutputBlock
中,如何生成与输入相差180度的输出
以下是我目前的代码:
__weak AppDelegate * wself = self;
self.ringBuffer = new RingBuffer(32768, 2);
self.audioManager = [Novocaine audioManager];
[self.audioManager setInputBlock:^(float *data, UInt32 numFrames, UInt32 numChannels)
{
wself.ringBuffer->AddNewInterleavedFloatData(data, numFrames, numChannels);
}];
[self.audioManager setOutputBlock:^(float *data, UInt32 numFrames, UInt32 numChannels)
{
wself.ringBuffer->FetchInterleavedData(data, numFrames, numChannels);
for (int i=0; i < numFrames; ++i)
{
for (int iChannel = 0; iChannel < numChannels; ++iChannel)
{
// Within here do noise cancellation. How?
}
}
}];
\uuu弱AppDelegate*wself=self;
self.ringBuffer=新的ringBuffer(32768,2);
self.audioManager=[Novocaine audioManager];
[self.audioManager setInputBlock:^(浮点*数据、UInt32 numFrames、UInt32 numChannels)
{
wself.ringBuffer->AddNewInterleavedFloatData(数据、numFrames、numChannels);
}];
[self.audioManager setOutputBlock:^(浮点*数据、UInt32 numFrames、UInt32 numChannels)
{
wself.ringBuffer->FetchInterleavedData(数据、numFrames、numChannels);
对于(int i=0;i
我一直在想同样的事情。我的想法是使用这样的东西:
data[i*numChannels + iChannel] *= -1;
编辑这段代码可能会用于反转阶段(甚至可能不起作用)。然而,考虑到iPhone本身的延迟,主动噪声消除通常不仅仅是简单地反转相位。@mygaudio有什么想法吗?