Make RTCAudioSession accessible to Swift.
This is done by: 1. removing the <vector> include from RTCAudioSession+Private, 2. creating a audio_session_objc package that excludes the RTCNativeAudioSessionDelegateAdapter class. Bug: webrtc:11237 Change-Id: I36c86542a19e3244456fd164d908563b1435de29 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163900 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Chuck Hays <haysc@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30177}
This commit is contained in:
@ -10,8 +10,6 @@
|
||||
|
||||
#import "RTCAudioSession.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class RTCAudioSessionConfiguration;
|
||||
@ -77,8 +75,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (NSError *)configurationErrorWithDescription:(NSString *)description;
|
||||
|
||||
// Properties and methods for tests.
|
||||
@property(nonatomic, readonly) std::vector<__weak id<RTCAudioSessionDelegate> > delegates;
|
||||
|
||||
- (void)notifyDidBeginInterruption;
|
||||
- (void)notifyDidEndInterruptionWithShouldResumeSession:(BOOL)shouldResumeSession;
|
||||
- (void)notifyDidChangeRouteWithReason:(AVAudioSessionRouteChangeReason)reason
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "rtc_base/atomic_ops.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/critical_section.h"
|
||||
@ -25,6 +27,10 @@ NSInteger const kRTCAudioSessionErrorLockRequired = -1;
|
||||
NSInteger const kRTCAudioSessionErrorConfiguration = -2;
|
||||
NSString * const kRTCAudioSessionOutputVolumeSelector = @"outputVolume";
|
||||
|
||||
@interface RTCAudioSession ()
|
||||
@property(nonatomic, readonly) std::vector<__weak id<RTCAudioSessionDelegate> > delegates;
|
||||
@end
|
||||
|
||||
// This class needs to be thread-safe because it is accessed from many threads.
|
||||
// TODO(tkchin): Consider more granular locking. We're not expecting a lot of
|
||||
// lock contention so coarse locks should be fine for now.
|
||||
|
||||
Reference in New Issue
Block a user