Currently, I use AVFoundation's AVCaptureVideoDataOutput to create a camera application.
It is a specification that I tap the shooting button and save the necessary frame as a still image on the camera roll.
(I do not save movies.)
About the shutter sound of the iPhone, I ask you a question.
What kind of coding should I do in order to sound the iPhone's default shutter sound?
At first, I created a camera application without shutter sound using AVCaptureVideoDataOutput.
Next, I would like to create a camera with shutter sound using AVCaptureVideoDataOutput.
I do not know how to sound the iPhone's default shutter sound while using AVCaptureVideoDataOutput.
Is there a way to forcibly sound the iPhone's default shutter sound?
I'd like to implement AVCaptureVideoDataOutput because I want to implement both movie shooting and still shooting in the future.
You can check all full sounds here:
For a custom sound:
AVAudioPlayer *audioPlayer; NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"Name of your audio file" ofType:@"type of your audio file example: mp3"]; NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath]; audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:nil]; audioPlayer.numberOfLoops = -1; [audioPlayer play];
Make sure you import