AudioParams
- React Native
更新时间不可用
音频数据格式。
export class AudioParams {
sample_rate?: number;
channels?: number;
mode?: RawAudioFrameOpModeType;
samples_per_call?: number;
}SDK 会根据 AudioParams 设置以下回调中的音频数据格式:
注:
- SDK 会通过 AudioParams 中的
samplesPerCall、sampleRate和channel参数计算采样间隔,并根据该采样间隔触发 onRecordAudioFrame、onPlaybackAudioFrame、onMixedAudioFrame 和 onEarMonitoringAudioFrame 回调。 - 采样间隔 =
samplesPerCall/(sampleRate×channel)。 - 请确保采样间隔不得小于 0.01 (s)。
属性
| 参数名 | 描述 |
|---|---|
sample_rate | |
channels | |
mode | 数据的使用模式。详见 RawAudioFrameOpModeType。 |
samples_per_call |