Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AVFoundation] Implement Xcode 16.0 beta 1, beta 2 and beta 3 changes (from AVFAudio only). #20851

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -1957,13 +1973,22 @@ interface AVAudioSessionSecondaryAudioHintEventArgs {
/// <summary>The delegate for <see cref="M:AVFoundation.AVAudioSession.RequestRecordPermission(AVFoundation.AVPermissionGranted)" />.</summary>
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)]
Expand Down
1 change: 1 addition & 0 deletions tests/cecil-tests/ApiAvailabilityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ bool SkipSupportedAndObsoleteAtTheSameTime (ICustomAttributeProvider api, AppleP
case "Intents.IINSendMessageIntentHandling.ResolveGroupName(Intents.INSendMessageIntent, System.Action`1<Intents.INStringResolutionResult>)":
case "Security.SecSharedCredential.RequestSharedWebCredential(System.String, System.String, System.Action`2<Security.SecSharedCredentialInfo[],Foundation.NSError>)":
case "System.String Intents.INSendMessageIntent::GroupName()":
case "AVFoundation.AVAudioSessionInterruptionReason AVFoundation.AVAudioSessionInterruptionReason::AppWasSuspended":
return true;
}
break;
Expand Down
4 changes: 4 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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@)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions tests/xtro-sharpie/iOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/xtro-sharpie/macOS-AVFoundation.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tests/xtro-sharpie/macOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/xtro-sharpie/tvOS-AVFoundation.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tests/xtro-sharpie/tvOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tests/xtro-sharpie/watchOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down