cn.tee3.avd_SDK-Objectc  2.1.0
构造函数 | 类方法 | 属性 | 所有成员列表
RTCAudioSession类 参考

Proxy class for AVAudioSession that adds a locking mechanism similar to AVCaptureDevice. 更多...

类 RTCAudioSession 继承关系图:

构造函数

(void) - addDelegate:
 Adds a delegate, which is held weakly. 更多...
 
(void) - removeDelegate:
 Removes an added delegate. 更多...
 
(void) - lockForConfiguration
 Request exclusive access to the audio session for configuration. 更多...
 
(void) - unlockForConfiguration
 Relinquishes exclusive access to the audio session. 更多...
 
(BOOL) - setActive:error:
 If |active|, activates the audio session if it isn't already active. 更多...
 
(BOOL) - setActive:withOptions:error:
 
(BOOL) - setCategory:withOptions:error:
 
(BOOL) - setMode:error:
 
(BOOL) - setInputGain:error:
 
(BOOL) - setPreferredSampleRate:error:
 
(BOOL) - setPreferredIOBufferDuration:error:
 
(BOOL) - setPreferredInputNumberOfChannels:error:
 
(BOOL) - setPreferredOutputNumberOfChannels:error:
 
(BOOL) - overrideOutputAudioPort:error:
 
(BOOL) - setPreferredInput:error:
 
(BOOL) - setInputDataSource:error:
 
(BOOL) - setOutputDataSource:error:
 

类方法

(instancetype) + sharedInstance
 Default constructor. 更多...
 

属性

AVAudioSession * session
 Convenience property to access the AVAudioSession singleton. 更多...
 
BOOL isActive
 Our best guess at whether the session is active based on results of calls to AVAudioSession. 更多...
 
BOOL isLocked
 Whether RTCAudioSession is currently locked for configuration. 更多...
 
NSString * category
 
AVAudioSessionCategoryOptions categoryOptions
 
NSString * mode
 
BOOL secondaryAudioShouldBeSilencedHint
 
AVAudioSessionRouteDescription * currentRoute
 
NSInteger maximumInputNumberOfChannels
 
NSInteger maximumOutputNumberOfChannels
 
float inputGain
 
BOOL inputGainSettable
 
BOOL inputAvailable
 
NSArray * inputDataSources
 
AVAudioSessionDataSourceDescription * inputDataSource
 NSArray<AVAudioSessionDataSourceDescription *> * inputDataSources; 更多...
 
NSArray * outputDataSources
 
AVAudioSessionDataSourceDescription * outputDataSource
 NSArray<AVAudioSessionDataSourceDescription *> * outputDataSources; 更多...
 
double sampleRate
 
NSInteger inputNumberOfChannels
 
NSInteger outputNumberOfChannels
 
float outputVolume
 
NSTimeInterval inputLatency
 
NSTimeInterval outputLatency
 
NSTimeInterval IOBufferDuration
 

详细描述

Proxy class for AVAudioSession that adds a locking mechanism similar to AVCaptureDevice.

This is used to that interleaving configurations between WebRTC and the application layer are avoided. Only setter methods are currently proxied. Getters can be accessed directly off AVAudioSession.

RTCAudioSession also coordinates activation so that the audio session is activated only once. See |setActive:error:|.

函数文档

◆ addDelegate:()

- (void) addDelegate: (id< RTCAudioSessionDelegate >)  delegate

Adds a delegate, which is held weakly.

Even though it's held weakly, callers should still call |removeDelegate| when it's no longer required to ensure proper dealloc. This is due to internal use of an NSHashTable.

◆ lockForConfiguration()

- (void) lockForConfiguration

Request exclusive access to the audio session for configuration.

This call will block if the lock is held by another object.

◆ overrideOutputAudioPort:error:()

- (BOOL) overrideOutputAudioPort: (AVAudioSessionPortOverride)  portOverride
error: (NSError **)  outError 

◆ removeDelegate:()

- (void) removeDelegate: (id< RTCAudioSessionDelegate >)  delegate

Removes an added delegate.

◆ setActive:error:()

- (BOOL) setActive: (BOOL)  active
error: (NSError **)  outError 

If |active|, activates the audio session if it isn't already active.

Successful calls must be balanced with a setActive:NO when activation is no longer required. If not |active|, deactivates the audio session if one is active and this is the last balanced call. When deactivating, the AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation option is passed to AVAudioSession.

◆ setActive:withOptions:error:()

- (BOOL) setActive: (BOOL)  active
withOptions: (AVAudioSessionSetActiveOptions)  options
error: (NSError **)  outError 

◆ setCategory:withOptions:error:()

- (BOOL) setCategory: (NSString *)  category
withOptions: (AVAudioSessionCategoryOptions)  options
error: (NSError **)  outError 

◆ setInputDataSource:error:()

- (BOOL) setInputDataSource: (AVAudioSessionDataSourceDescription *)  dataSource
error: (NSError **)  outError 

◆ setInputGain:error:()

- (BOOL) setInputGain: (float)  gain
error: (NSError **)  outError 

◆ setMode:error:()

- (BOOL) setMode: (NSString *)  mode
error: (NSError **)  outError 

◆ setOutputDataSource:error:()

- (BOOL) setOutputDataSource: (AVAudioSessionDataSourceDescription *)  dataSource
error: (NSError **)  outError 

◆ setPreferredInput:error:()

- (BOOL) setPreferredInput: (AVAudioSessionPortDescription *)  inPort
error: (NSError **)  outError 

◆ setPreferredInputNumberOfChannels:error:()

- (BOOL) setPreferredInputNumberOfChannels: (NSInteger)  count
error: (NSError **)  outError 

◆ setPreferredIOBufferDuration:error:()

- (BOOL) setPreferredIOBufferDuration: (NSTimeInterval)  duration
error: (NSError **)  outError 

◆ setPreferredOutputNumberOfChannels:error:()

- (BOOL) setPreferredOutputNumberOfChannels: (NSInteger)  count
error: (NSError **)  outError 

◆ setPreferredSampleRate:error:()

- (BOOL) setPreferredSampleRate: (double)  sampleRate
error: (NSError **)  outError 

◆ sharedInstance()

+ (instancetype) sharedInstance

Default constructor.

Do not call init.

◆ unlockForConfiguration()

- (void) unlockForConfiguration

Relinquishes exclusive access to the audio session.

属性说明

◆ category

- (NSString*) category
readatomicassign

◆ categoryOptions

- (AVAudioSessionCategoryOptions) categoryOptions
readatomicassign

◆ currentRoute

- (AVAudioSessionRouteDescription*) currentRoute
readatomicassign

◆ inputAvailable

- (BOOL) inputAvailable
readatomicassign

◆ inputDataSource

- (AVAudioSessionDataSourceDescription*) inputDataSource
readatomicassign

NSArray<AVAudioSessionDataSourceDescription *> * inputDataSources;

◆ inputDataSources

- (NSArray*) inputDataSources
readatomicassign

◆ inputGain

- (float) inputGain
readatomicassign

◆ inputGainSettable

- (BOOL) inputGainSettable
readatomicassign

◆ inputLatency

- (NSTimeInterval) inputLatency
readatomicassign

◆ inputNumberOfChannels

- (NSInteger) inputNumberOfChannels
readatomicassign

◆ IOBufferDuration

- (NSTimeInterval) IOBufferDuration
readatomicassign

◆ isActive

- (BOOL) isActive
readnonatomicassign

Our best guess at whether the session is active based on results of calls to AVAudioSession.

◆ isLocked

- (BOOL) isLocked
readnonatomicassign

Whether RTCAudioSession is currently locked for configuration.

◆ maximumInputNumberOfChannels

- (NSInteger) maximumInputNumberOfChannels
readatomicassign

◆ maximumOutputNumberOfChannels

- (NSInteger) maximumOutputNumberOfChannels
readatomicassign

◆ mode

- (NSString*) mode
readatomicassign

◆ outputDataSource

- (AVAudioSessionDataSourceDescription*) outputDataSource
readatomicassign

NSArray<AVAudioSessionDataSourceDescription *> * outputDataSources;

◆ outputDataSources

- (NSArray*) outputDataSources
readatomicassign

◆ outputLatency

- (NSTimeInterval) outputLatency
readatomicassign

◆ outputNumberOfChannels

- (NSInteger) outputNumberOfChannels
readatomicassign

◆ outputVolume

- (float) outputVolume
readatomicassign

◆ sampleRate

- (double) sampleRate
readatomicassign

◆ secondaryAudioShouldBeSilencedHint

- (BOOL) secondaryAudioShouldBeSilencedHint
readatomicassign

◆ session

- (AVAudioSession*) session
readnonatomicassign

Convenience property to access the AVAudioSession singleton.

Callers should not call setters on AVAudioSession directly, but other method invocations are fine.


该类的文档由以下文件生成: