diff --git a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m b/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m index e74614b..66ae4d6 100644 --- a/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m +++ b/pkg/avfoundation/AVFoundationBind/AVFoundationBind.m @@ -183,20 +183,21 @@ STATUS AVBindDevices(AVBindMediaType mediaType, PAVBindDevice *ppDevices, int *p PAVBindDevice pDevice; AVMediaType _mediaType = mediaType == AVBindMediaTypeVideo ? AVMediaTypeVideo : AVMediaTypeAudio; - NSArray *refAllTypes; - if (@available(macOS 14.0, *)) { - refAllTypes = @[ + #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_14_0 + NSArray *refAllTypes = @[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeMicrophone, AVCaptureDeviceTypeExternal, ]; - } else { - refAllTypes = @[ + #else + NSArray *refAllTypes = @[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeBuiltInMicrophone, AVCaptureDeviceTypeExternalUnknown, ]; - } + #endif + + AVCaptureDeviceDiscoverySession *refSession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes: refAllTypes