How to erase the shutter sound of iPhone with the principle of noise canceling technology


ByDavid Goehring

People who want to silence the shutter sound by the iOS terminal by all means · I think that people who want to erase use various methods such as renaming the file which is the source of the shutter sound, overwriting with the same name file of silence, but programmer For Q & A site forStack OverflowIn "It has a cooler way", there is introduced a method of multiplying the phase of the shutter sound by the reversed phase and putting it into silence state.

Iphone - AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection? - Stack Overflow
http://stackoverflow.com/questions/4401232/avfoundation-how-to-turn-off-the-shutter-sound-when-capturestillimageasynchrono

This is a user who asked ohho who is producing a camera application for iOS, asked Stack Overflow questions why the shutter sound will inevitably sound like something.

Initially, when making a camera application for iOS,UIImagePickerControllerHow to use "AVFoundation.frameworkThere are two ways to use. The easiest thing is to use "UIImagePickerController", but the high degree of freedom is to use "AVFoundation.framework", ohho uses AVFoundation to acquire images from the live view screen of the camera, thereby generating a shutter sound I thought about losing it, but it seems that it did not work.

According to the answer to the question, the procedure begins with a shutter sound file built in iPhone "PhotoShutter.cafAcquired. Open the file with waveform editing software and invert the waveform to create a reverse phase file. The upper row shows the waveform enlarging the original file and the lower row shows the data with the phase inverted.


As you draw the extension line, you can see that the mountain portion of the waveform is just upside down and upside down.


next,Files in reverse phaseTo [PhotoShutter2.caf] File name, and use the following code to play the sound just before you release the shutter (capture image) with "captureStillImageAsynchronouslyFromConnection". As a result, when you try to shut down with the camera application, the normal shutter sound (photoShutter.caf) and the opposite phase of the shutter sound (photoShutter 2. caf) sound at the same time, so the two sounds are canceled and the shutter sound is lost It is becoming.


When I actually tested it several times with this method, I could not confirm the shutter sound at all. In principle, pick up external noise with a microphone and play back the noise to reduce noiseNoise canceling headphoneIt is the same behavior as this, but since it uses the same waveform at the original data level, it seems to be more effective. In order to combine anti-phase components and cancel the waveform, since the effect should be drastically reduced unless the position is exactly matched on a sample unit basis, it is a concern as to how to control that control.

in Software, Posted by darkhorse_log