-
Notifications
You must be signed in to change notification settings - Fork 9
SNAudioPrepProtocol
Ju Liaoyuan edited this page Dec 20, 2022
·
1 revision
Conforms to NSObject
Declared in SNAudioPrepProtocol.h
– audioFrameFormat:sampleRate:presentationTime: required method
– audioPreprocessWithInFrame:outFrame:length: required method
PCM 数据格式,调用方可以在该回调用拿到格式信息,用来初始化自己的音频处理单元 channels: 通道数 sampleRate: 采样率 presentationTime: 帧时长
- (void)audioFrameFormat:(int)*channels* sampleRate:(int)*sampleRate* presentationTime:(float)*presentationTime*
PCM 数据格式,调用方可以在该回调用拿到格式信息,用来初始化自己的音频处理单元 channels: 通道数 sampleRate: 采样率 presentationTime: 帧时长
SNAudioPrepProtocol.h
预处理回调 inFrame: 输入帧 outFrame: 处理后的输出帧 length: 输入帧的长度
- (void)audioPreprocessWithInFrame:(unsigned char *)*inFrame* outFrame:(unsigned char *)*outFrame* length:(int)*inFrameLength*
预处理回调 inFrame: 输入帧 outFrame: 处理后的输出帧 length: 输入帧的长度
SNAudioPrepProtocol.h