From b2291d2d8926f3aff6a66f46b8d637d43e5e153e Mon Sep 17 00:00:00 2001 From: Stephen Booth Date: Sun, 28 Dec 2025 21:43:02 -0600 Subject: [PATCH] Add `userInfo` to AVAE configuration change notification --- Sources/CSFBAudioEngine/Player/AudioPlayer.mm | 4 ++-- .../CSFBAudioEngine/include/SFBAudioEngine/SFBAudioPlayer.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/CSFBAudioEngine/Player/AudioPlayer.mm b/Sources/CSFBAudioEngine/Player/AudioPlayer.mm index 978e155d..2bf15f1d 100644 --- a/Sources/CSFBAudioEngine/Player/AudioPlayer.mm +++ b/Sources/CSFBAudioEngine/Player/AudioPlayer.mm @@ -1884,8 +1884,8 @@ bool PerformSeekIfRequired() noexcept } } - if([player_.delegate respondsToSelector:@selector(audioPlayerAVAudioEngineConfigurationChange:)]) - [player_.delegate audioPlayerAVAudioEngineConfigurationChange:player_]; + if([player_.delegate respondsToSelector:@selector(audioPlayer:audioEngineConfigurationChange:)]) + [player_.delegate audioPlayer:player_ audioEngineConfigurationChange:userInfo]; } #if TARGET_OS_IPHONE diff --git a/Sources/CSFBAudioEngine/include/SFBAudioEngine/SFBAudioPlayer.h b/Sources/CSFBAudioEngine/include/SFBAudioEngine/SFBAudioPlayer.h index 8cf57676..da96a48a 100644 --- a/Sources/CSFBAudioEngine/include/SFBAudioEngine/SFBAudioPlayer.h +++ b/Sources/CSFBAudioEngine/include/SFBAudioEngine/SFBAudioPlayer.h @@ -367,7 +367,8 @@ NS_SWIFT_NAME(AudioPlayer.Delegate) @protocol SFBAudioPlayerDelegate /// Called to notify the delegate when the configuration of the `AVAudioEngine` changes /// - note: Use this instead of listening for `AVAudioEngineConfigurationChangeNotification` /// - parameter audioPlayer: The `SFBAudioPlayer` object -- (void)audioPlayerAVAudioEngineConfigurationChange:(SFBAudioPlayer *)audioPlayer NS_SWIFT_NAME(audioPlayerAVAudioEngineConfigurationChange(_:)); +/// - parameter userInfo: The `userInfo` object from the notification +- (void)audioPlayer:(SFBAudioPlayer *)audioPlayer audioEngineConfigurationChange:(nullable NSDictionary *)userInfo; /// Called to notify the delegate when an asynchronous error occurs /// - parameter audioPlayer: The `SFBAudioPlayer` object /// - parameter error: The error