0
点赞
收藏
分享

微信扫一扫

iOS如何拍照静音

楚木巽 2021-09-22 阅读 84

完美解决:

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);

1108 是非公开的音频ID,有可能被拒
举报

相关推荐

0 条评论