ios 通过默认 iPhone 耳机主动降噪
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17720109/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Active Noise Cancellation through default iPhone headphone
提问by Ashok
We want to create an App that will implement the Active Noise Cancellation using the default iPhone headphone. That is, to receive the external audio using the iPhone headphone Mic and make a phase shift of 180 degree. Finally, to play the inverted sound through default headphone speaker to cancel the external sound(Active noise cancellation).
我们想要创建一个应用程序,该应用程序将使用默认的 iPhone 耳机实现主动降噪。即使用 iPhone 耳机麦克风接收外部音频并进行 180 度相移。最后,通过默认耳机扬声器播放倒置声音以消除外部声音(主动降噪)。
Ref: http://electronics.howstuffworks.com/gadgets/audio-music/noise-canceling-headphone.htm
参考:http: //electronics.howstuffworks.com/gadgets/audio-music/noise-canceling-headphone.htm
Can this be feasible with the iPhone App?
这对 iPhone 应用程序可行吗?
回答by lericson
With sound traveling at 343 m/s, assuming the distance between microphone and speaker is half a meter, you'd have about 1.5 milliseconds of processing time. Not impossible, but not a simple feat either, especially if you take into account the time it takes for the various components to actually start playback and for the recording to get to your app. I think this is also why most of the active noise canceling headphones require specialized hardware.
声音以 343 m/s 的速度传播,假设麦克风和扬声器之间的距离为半米,则处理时间约为 1.5 毫秒。并非不可能,但也不是一项简单的壮举,特别是如果您考虑到各个组件实际开始播放以及录制内容到达您的应用程序所需的时间。我认为这也是大多数主动降噪耳机需要专门硬件的原因。
That said, I think you should definitely go for it. I'm very interested in this as well; I guess you would have to do a Fourier transform on the input and then phase shift it 180° like you said, then transform that back to the time domain, and finally play it to the user?
也就是说,我认为你绝对应该去做。我对这个也很感兴趣;我想您必须对输入进行傅立叶变换,然后像您说的那样将其相移 180°,然后将其转换回时域,最后将其播放给用户?
回答by Giuseppe
The problem i see is that there is one component missing to do a correct noise cancellation: there should be a mike at the headphone output to sense the complete output and close the loop of the noise cancellation system.
我看到的问题是缺少一个组件来正确消除噪音:耳机输出端应该有一个麦克风来感知完整的输出并关闭噪音消除系统的回路。
Regards
问候