音频混音主力
音频混音主体主要通过(重采样) + (混音)为主
音频重采样
内容实现是在webrtc::voe中实现的,下面来对重采样全流程逐一分析 。
void RemixAndResample(const AudioFrame& src_frame,//源音频数据帧PushResampler<int16_t>* resampler,//重采样对象AudioFrame* dst_frame) {//重采样后的音频帧RemixAndResample(src_frame.data(), src_frame.samples_per_channel_,src_frame.num_channels_, src_frame.sample_rate_hz_,resampler, dst_frame);dst_frame->timestamp_ = src_frame.timestamp_;dst_frame->elapsed_time_ms_ = src_frame.elapsed_time_ms_;dst_frame->ntp_time_ms_ = src_frame.ntp_time_ms_;dst_frame->packet_infos_ = src_frame.packet_infos_;
}void RemixAndResample(const int16_t* src_data,size_t samples_per_channel,size_t num_channels,int sample_rate_hz,