iOS如何拍照静音
2020-08-14 本文已影响0人
阿拉斯加的狗
完美解决:
AVCapturePhotoCaptureDelegate
- (void)captureOutput:(AVCapturePhotoOutput *)output didFinishProcessingPhotoSampleBuffer:(CMSampleBufferRef)photoSampleBuffer previewPhotoSampleBuffer:(CMSampleBufferRef)previewPhotoSampleBuffer resolvedSettings:(AVCaptureResolvedPhotoSettings *)resolvedSettings bracketSettings:(AVCaptureBracketedStillImageSettings *)bracketSettings error:(NSError *)error;
- (void)captureOutput:(AVCapturePhotoOutput *)output willCapturePhotoForResolvedSettings:(AVCaptureResolvedPhotoSettings *)resolvedSettings{
/// 释放声音
AudioServicesDisposeSystemSoundID(1108);
}
复制代码willCapturePhotoForResolvedSettings 时释放声音
AudioServicesDisposeSystemSoundID(1108);