File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -491,7 +491,12 @@ extension CodeScannerView {
491
491
492
492
@available ( macCatalyst 14 . 0 , * )
493
493
extension CodeScannerView . ScannerViewController : AVCapturePhotoCaptureDelegate {
494
- public func photoOutput( _ output: AVCapturePhotoOutput , didFinishProcessingPhoto photo: AVCapturePhoto , error: Error ? ) {
494
+
495
+ public func photoOutput(
496
+ _ output: AVCapturePhotoOutput ,
497
+ didFinishProcessingPhoto photo: AVCapturePhoto ,
498
+ error: Error ?
499
+ ) {
495
500
isCapturing = false
496
501
guard let imageData = photo. fileDataRepresentation ( ) else {
497
502
print ( " Error while generating image from photo capture data. " ) ;
@@ -502,5 +507,20 @@ extension CodeScannerView.ScannerViewController: AVCapturePhotoCaptureDelegate {
502
507
return
503
508
}
504
509
handler ? ( qrImage)
505
- }
510
+ }
511
+
512
+ public func photoOutput(
513
+ _ output: AVCapturePhotoOutput ,
514
+ willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings
515
+ ) {
516
+ AudioServicesDisposeSystemSoundID ( 1108 )
517
+ }
518
+
519
+ public func photoOutput(
520
+ _ output: AVCapturePhotoOutput ,
521
+ didCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings
522
+ ) {
523
+ AudioServicesDisposeSystemSoundID ( 1108 )
524
+ }
525
+
506
526
}
You can’t perform that action at this time.
0 commit comments