diff --git a/src/avfoundation.cs b/src/avfoundation.cs index b2d0b6b521c0..00827c57ea7e 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -1157,6 +1157,14 @@ interface AVAudioEnvironmentNode : AVAudioMixing { [MacCatalyst (13, 1)] [Export ("outputType", ArgumentSemantic.Assign)] AVAudioEnvironmentOutputType OutputType { get; set; } + + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [Export ("listenerHeadTrackingEnabled")] + bool ListenerHeadTrackingEnabled { + [Bind ("isListenerHeadTrackingEnabled")] + get; + set; + } } [MacCatalyst (13, 1)] @@ -1237,6 +1245,14 @@ interface AVAudioFile { [Export ("writeFromBuffer:error:")] bool WriteFromBuffer (AVAudioPcmBuffer buffer, out NSError outError); + + [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [Export ("close")] + void Close (); + + [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [Export ("isOpen")] + bool IsOpen { get; } } [MacCatalyst (13, 1)] @@ -1957,13 +1973,22 @@ interface AVAudioSessionSecondaryAudioHintEventArgs { /// The delegate for . delegate void AVPermissionGranted (bool granted); - [iOS (14, 5), Watch (7, 4), NoTV, NoMac] + [iOS (14, 5), Watch (7, 4), TV (14, 5), Mac (11, 3)] [MacCatalyst (14, 5)] [Native] public enum AVAudioSessionInterruptionReason : ulong { Default = 0, + [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Not reported anymore.")] + [Deprecated (PlatformName.iOS, 16, 0, message: "Not reported anymore.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Not reported anymore.")] + [Deprecated (PlatformName.MacOSX, 11, 3, message: "Not reported anymore.")] + [Deprecated (PlatformName.WatchOS, 9, 0, message: "Not reported anymore.")] AppWasSuspended = 1, BuiltInMicMuted = 2, + // visionOS only // WasBackgrounded = 3, + [iOS (17, 0), Watch (10, 0), TV (17, 0), MacCatalyst (17, 0), NoMac] + RouteDisconnected = 4, + // visionOS only // DeviceUnauthenticated = 5, } [Watch (8, 0), TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] diff --git a/tests/cecil-tests/ApiAvailabilityTest.cs b/tests/cecil-tests/ApiAvailabilityTest.cs index e4f2a1022721..ff9d731c220e 100644 --- a/tests/cecil-tests/ApiAvailabilityTest.cs +++ b/tests/cecil-tests/ApiAvailabilityTest.cs @@ -457,6 +457,7 @@ bool SkipSupportedAndObsoleteAtTheSameTime (ICustomAttributeProvider api, AppleP case "Intents.IINSendMessageIntentHandling.ResolveGroupName(Intents.INSendMessageIntent, System.Action`1)": case "Security.SecSharedCredential.RequestSharedWebCredential(System.String, System.String, System.Action`2)": case "System.String Intents.INSendMessageIntent::GroupName()": + case "AVFoundation.AVAudioSessionInterruptionReason AVFoundation.AVAudioSessionInterruptionReason::AppWasSuspended": return true; } break; diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index a6a8bf106804..5eebf1f623dc 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -4954,6 +4954,7 @@ F:AVFoundation.AVAudioSessionInterruptionOptions.ShouldResume F:AVFoundation.AVAudioSessionInterruptionReason.AppWasSuspended F:AVFoundation.AVAudioSessionInterruptionReason.BuiltInMicMuted F:AVFoundation.AVAudioSessionInterruptionReason.Default +F:AVFoundation.AVAudioSessionInterruptionReason.RouteDisconnected F:AVFoundation.AVAudioSessionInterruptionType.Began F:AVFoundation.AVAudioSessionInterruptionType.Ended F:AVFoundation.AVAudioSessionIOType.Aggregated @@ -26361,6 +26362,7 @@ M:AVFoundation.AVAudioFile.#ctor(Foundation.NSUrl,AVFoundation.AudioSettings,AVF M:AVFoundation.AVAudioFile.#ctor(Foundation.NSUrl,AVFoundation.AudioSettings,Foundation.NSError@) M:AVFoundation.AVAudioFile.#ctor(Foundation.NSUrl,AVFoundation.AVAudioCommonFormat,System.Boolean,Foundation.NSError@) M:AVFoundation.AVAudioFile.#ctor(Foundation.NSUrl,Foundation.NSError@) +M:AVFoundation.AVAudioFile.Close M:AVFoundation.AVAudioFile.ReadIntoBuffer(AVFoundation.AVAudioPcmBuffer,Foundation.NSError@) M:AVFoundation.AVAudioFile.ReadIntoBuffer(AVFoundation.AVAudioPcmBuffer,System.UInt32,Foundation.NSError@) M:AVFoundation.AVAudioFile.WriteFromBuffer(AVFoundation.AVAudioPcmBuffer,Foundation.NSError@) @@ -56262,6 +56264,7 @@ P:AVFoundation.AVAudioEnvironmentDistanceAttenuationParameters.RolloffFactor P:AVFoundation.AVAudioEnvironmentNode.ApplicableRenderingAlgorithms P:AVFoundation.AVAudioEnvironmentNode.DistanceAttenuationParameters P:AVFoundation.AVAudioEnvironmentNode.ListenerAngularOrientation +P:AVFoundation.AVAudioEnvironmentNode.ListenerHeadTrackingEnabled P:AVFoundation.AVAudioEnvironmentNode.ListenerPosition P:AVFoundation.AVAudioEnvironmentNode.ListenerVectorOrientation P:AVFoundation.AVAudioEnvironmentNode.NextAvailableInputBus @@ -56283,6 +56286,7 @@ P:AVFoundation.AVAudioEnvironmentReverbParameters.FilterParameters P:AVFoundation.AVAudioEnvironmentReverbParameters.Level P:AVFoundation.AVAudioFile.FileFormat P:AVFoundation.AVAudioFile.FramePosition +P:AVFoundation.AVAudioFile.IsOpen P:AVFoundation.AVAudioFile.Length P:AVFoundation.AVAudioFile.ProcessingFormat P:AVFoundation.AVAudioFile.Url diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo index f5528c2a5999..98b77dc25c3d 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo @@ -313,7 +313,6 @@ !missing-enum! AVPlayerLooperItemOrdering not bound !missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound !missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-enum-value! AVAudioSessionInterruptionReason native value AVAudioSessionInterruptionReasonRouteDisconnected = 4 not bound !missing-field! AVAssetExportPresetMVHEVC1440x1440 not bound !missing-field! AVAssetExportPresetMVHEVC960x960 not bound !missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound @@ -580,10 +579,6 @@ !missing-selector! AVAssetWriterInputCaptionAdaptor::appendCaptionGroup: not bound !missing-selector! AVAssetWriterInputCaptionAdaptor::assetWriterInput not bound !missing-selector! AVAssetWriterInputCaptionAdaptor::initWithAssetWriterInput: not bound -!missing-selector! AVAudioEnvironmentNode::isListenerHeadTrackingEnabled not bound -!missing-selector! AVAudioEnvironmentNode::setListenerHeadTrackingEnabled: not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVCaption::animation not bound !missing-selector! AVCaption::backgroundColorAtIndex:range: not bound !missing-selector! AVCaption::decorationAtIndex:range: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore index 01bdf9502013..bbb62661b2c5 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore @@ -36,9 +36,6 @@ !extra-enum-value! Managed value -11837 for AVError.DeviceIsNotAvailableInBackground not found in native headers !extra-enum-value! Managed value -11847 for AVError.OperationInterrupted not found in native headers -# not used on macOS -!missing-enum! AVAudioSessionInterruptionReason not bound - ## https://github.com/xamarin/xamarin-macios/issues/16229 prevents crashing instead of return null ## so these selectors have been bound manually !missing-selector! AVAudioPlayer::initWithContentsOfURL:error: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo index c91b5327af45..33704227c5b8 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo @@ -534,10 +534,6 @@ !missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound !missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound !missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVAudioEnvironmentNode::isListenerHeadTrackingEnabled not bound -!missing-selector! AVAudioEnvironmentNode::setListenerHeadTrackingEnabled: not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound !missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound !missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore index 66de0b4a1eb9..93c7dc807dfe 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore @@ -4,9 +4,6 @@ # as per the header comments, the following enum has to be ignored on tvOS !missing-enum! AVAudioSessionIOType not bound -# not used on tvOS -!missing-enum! AVAudioSessionInterruptionReason not bound - ### deprecated in iOS8 !missing-protocol-member! AVAudioPlayerDelegate::audioPlayerEndInterruption:withFlags: not found diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo index 3e93c253d3ae..611feb2b71af 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo @@ -1164,10 +1164,6 @@ !missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound !missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound !missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVAudioEnvironmentNode::isListenerHeadTrackingEnabled not bound -!missing-selector! AVAudioEnvironmentNode::setListenerHeadTrackingEnabled: not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound !missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound !missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound diff --git a/tests/xtro-sharpie/iOS-AVFoundation.todo b/tests/xtro-sharpie/iOS-AVFoundation.todo index f5528c2a5999..98b77dc25c3d 100644 --- a/tests/xtro-sharpie/iOS-AVFoundation.todo +++ b/tests/xtro-sharpie/iOS-AVFoundation.todo @@ -313,7 +313,6 @@ !missing-enum! AVPlayerLooperItemOrdering not bound !missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound !missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-enum-value! AVAudioSessionInterruptionReason native value AVAudioSessionInterruptionReasonRouteDisconnected = 4 not bound !missing-field! AVAssetExportPresetMVHEVC1440x1440 not bound !missing-field! AVAssetExportPresetMVHEVC960x960 not bound !missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound @@ -580,10 +579,6 @@ !missing-selector! AVAssetWriterInputCaptionAdaptor::appendCaptionGroup: not bound !missing-selector! AVAssetWriterInputCaptionAdaptor::assetWriterInput not bound !missing-selector! AVAssetWriterInputCaptionAdaptor::initWithAssetWriterInput: not bound -!missing-selector! AVAudioEnvironmentNode::isListenerHeadTrackingEnabled not bound -!missing-selector! AVAudioEnvironmentNode::setListenerHeadTrackingEnabled: not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVCaption::animation not bound !missing-selector! AVCaption::backgroundColorAtIndex:range: not bound !missing-selector! AVCaption::decorationAtIndex:range: not bound diff --git a/tests/xtro-sharpie/macOS-AVFoundation.ignore b/tests/xtro-sharpie/macOS-AVFoundation.ignore index 92f267db2b59..f7ec7a4745e9 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/macOS-AVFoundation.ignore @@ -41,7 +41,6 @@ !extra-enum-value! Managed value -11847 for AVError.OperationInterrupted not found in native headers # not used on macOS -!missing-enum! AVAudioSessionInterruptionReason not bound !missing-protocol! AVVideoCompositionInstruction not bound !incorrect-protocol-member! AVAssetResourceLoaderDelegate::resourceLoader:shouldWaitForLoadingOfRequestedResource: is OPTIONAL and should NOT be abstract !unknown-native-enum! AVAudioSessionFlags bound diff --git a/tests/xtro-sharpie/macOS-AVFoundation.todo b/tests/xtro-sharpie/macOS-AVFoundation.todo index c91b5327af45..33704227c5b8 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.todo +++ b/tests/xtro-sharpie/macOS-AVFoundation.todo @@ -534,10 +534,6 @@ !missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound !missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound !missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVAudioEnvironmentNode::isListenerHeadTrackingEnabled not bound -!missing-selector! AVAudioEnvironmentNode::setListenerHeadTrackingEnabled: not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound !missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound !missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/tvOS-AVFoundation.ignore index db46ab1516cb..803879213abc 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/tvOS-AVFoundation.ignore @@ -9,7 +9,6 @@ !unknown-field! AVAssetDownloadTaskMinimumRequiredMediaBitrateKey bound # not used on tvOS -!missing-enum! AVAudioSessionInterruptionReason not bound !missing-protocol! AVVideoCompositionInstruction not bound !incorrect-protocol-member! AVAssetResourceLoaderDelegate::resourceLoader:shouldWaitForLoadingOfRequestedResource: is OPTIONAL and should NOT be abstract !missing-protocol-conformance! AVVideoCompositionInstruction should conform to AVVideoCompositionInstruction diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.todo b/tests/xtro-sharpie/tvOS-AVFoundation.todo index 3e93c253d3ae..611feb2b71af 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.todo +++ b/tests/xtro-sharpie/tvOS-AVFoundation.todo @@ -1164,10 +1164,6 @@ !missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound !missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound !missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVAudioEnvironmentNode::isListenerHeadTrackingEnabled not bound -!missing-selector! AVAudioEnvironmentNode::setListenerHeadTrackingEnabled: not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound !missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound !missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound diff --git a/tests/xtro-sharpie/watchOS-AVFoundation.todo b/tests/xtro-sharpie/watchOS-AVFoundation.todo index 57652396d861..431ebd594c8d 100644 --- a/tests/xtro-sharpie/watchOS-AVFoundation.todo +++ b/tests/xtro-sharpie/watchOS-AVFoundation.todo @@ -30,7 +30,6 @@ !missing-enum! AVSpeechSynthesisMarkerMark not bound !missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound !missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-enum-value! AVAudioSessionInterruptionReason native value AVAudioSessionInterruptionReasonRouteDisconnected = 4 not bound !missing-enum-value! AVError native value AVErrorAirPlayReceiverTemporarilyUnavailable = -11882 not bound !missing-enum-value! AVError native value AVErrorEncodeFailed = -11883 not bound !missing-enum-value! AVError native value AVErrorFailedToLoadSampleData = -11881 not bound @@ -284,8 +283,6 @@ !missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found !missing-selector! +AVAssetVariantQualifier::predicateForAudioSampleRate:mediaSelectionOption:operatorType: not bound !missing-selector! +AVMetricEventStream::eventStream not bound -!missing-selector! AVAudioFile::close not bound -!missing-selector! AVAudioFile::isOpen not bound !missing-selector! AVContentKey::revoke not bound !missing-selector! AVMetricContentKeyRequestEvent::contentKeySpecifier not bound !missing-selector! AVMetricContentKeyRequestEvent::isClientInitiated not bound