webrtc audioprocess 分析
来源:互联网 发布:qq拼音 ubuntu 编辑:程序博客网 时间:2024/06/08 13:55
webrtc audioprocess 简称 apm是:
// The Audio Processing Module (APM) provides a collection of voice processing
// components designed for real-time communications software.
这里说了 apm是一个用于实时音频处理的组件
APM accepts only 16-bit linear PCM audio data in frames of 10 ms. Multiple channels should be interleaved.
这里说的很清楚 apm仅仅接受16bit的10毫秒每帧的pcm音频数据
// Usage example, omitting error checking:
// AudioProcessing* apm = AudioProcessing::Create(0);
//
// apm->high_pass_filter()->Enable(true);
//
// apm->echo_cancellation()->enable_drift_compensation(false);
// apm->echo_cancellation()->Enable(true);
//
// apm->noise_reduction()->set_level(kHighSuppression);
// apm->noise_reduction()->Enable(true);
//
// apm->gain_control()->set_analog_level_limits(0, 255);
// apm->gain_control()->set_mode(kAdaptiveAnalog);
// apm->gain_control()->Enable(true);
//
// apm->voice_detection()->Enable(true);
//
// // Start a voice call...
//
// // ... Render frame arrives bound for the audio HAL ...
// apm->AnalyzeReverseStream(render_frame);
//
// // ... Capture frame arrives from the audio HAL ...
// // Call required set_stream_ functions.
// apm->set_stream_delay_ms(delay_ms);
// apm->gain_control()->set_stream_analog_level(analog_level);
//
// apm->ProcessStream(capture_frame);
//
// // Call required stream_ functions.
// analog_level = apm->gain_control()->stream_analog_level();
// has_voice = apm->stream_has_voice();
//
// // Repeate render and capture processing for the duration of the call...
// // Start a new call...
// apm->Initialize();
//
// // Close the application...
// delete apm;
//
// DEPRECATED: It is now possible to modify the sample rate directly in a call
// to |ProcessStream|.
// Sets the sample |rate| in Hz for both the primary and reverse audio
// streams. 8000, 16000 or 32000 Hz are permitted.
这里有说 目前支持 8000 16000 32000hz采样率的音频
// Processes a 10 ms |frame| of the primary audio stream. On the client-side,
// this is the near-end (or captured) audio.
//
// If needed for enabled functionality, any function with the set_stream_ tag
// must be called prior to processing the current frame. Any getter function
// with the stream_ tag which is needed should be called after processing.
//
// The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_|
// members of |frame| must be valid. If changed from the previous call to this
// method, it will trigger an initialization.
这里说的很清楚:调用此processstream之前必须要至少设置3个参数 第一个是:
sample_rate_hz_ = 32000
num_channels_ =2
samples_per_channel_ = 320
virtual int ProcessStream(AudioFrame* frame) = 0;
后续文章继续追加
- webrtc audioprocess 分析
- webrtc原码分析
- webrtc 源码分析
- WebRTC中混音流程分析
- webrtc的pacing分析
- webRTC 网关技术点分析
- WebRTC视频分析:处理流程
- WebRTC源码分析总述
- WebRTC中丢包重传NACK实现分析
- WebRTC中丢包重传NACK实现分析
- webrtc研究-remb协议分析
- 「WebRTC」最新 WebRTC 源码目录结构分析
- WebRTC源码分析:音频模块结构分析
- WebRTC源码分析:音频模块结构分析
- audioprocess事件在Chrome上不触发?
- WebRTC
- WebRTC
- WEBRTC
- Memcache环境搭建_me
- Hibernate框架基础入门
- 进程会话
- Java异常 异常的一些细节
- 2015061503 - 从action返回到界面组织json字符串(方式1)
- webrtc audioprocess 分析
- 如何设计数据库(1)
- centos6.5 mysql
- 【好程序员笔记分享】—— 函数结合指针的妙用
- 如何设计数据库(2)
- Java使用SOAP获取webservice实例解析
- ANDROID GRIDVIEW仿微信图片多选功能_显示本地相册图片多选效果
- java 框架基础知识(7)----事务基础知识-->Spring事务管理
- ab压力测试及nginx性能统计模块