ACSRawOutgoingAudioStream 类

声明

@interface ACSRawOutgoingAudioStream : ACSOutgoingAudioStream;

说明

利用虚拟设备发送音频的音频流

方法

init

默认构造函数

-(instancetype)init:(ACSRawOutgoingAudioStreamOptions *)options;

参数

  • options -

sendRawAudioBuffer

用于发送音频缓冲区的方法。 缓冲区应与流属性中指定的格式、采样率和通道模式匹配。 对于每个块属性的数据,建议以指定大小发送数据,但此外,我们支持发送限制为 100 毫秒的较大缓冲区,只要它可以被每个块的指定数据均匀除以。

-(void)sendRawAudioBuffer:(ACSRawAudioBuffer *)rawAudioBuffer withCompletionHandler:(void (^)(NSError *error))completionHandler;

参数

  • rawAudioBuffer -
  • completionHandler - 在操作完成后以异步方式调用的块。

返回

  • void

属性

delegate

提供用于从此 ACSRawOutgoingAudioStream 实例接收事件的对象。

@property(nonatomic, assign) id<ACSRawOutgoingAudioStreamDelegate> delegate;

expectedBufferSizeInBytes

音频缓冲区的预期缓冲区大小

@property (readonly) int64_t expectedBufferSizeInBytes;

properties

此 CallAudioStream 设置为的 RawOutgoingAudioStreamProperties

@property (retain, nonnull, readonly) ACSRawOutgoingAudioStreamProperties * properties;