Chromium Code Reviews| Index: webrtc/modules/audio_processing/audio_processing_impl.h |
| diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h |
| index f83f6adb0735692ca2d1743466fc68f0182bd9c4..eb84d31a925867e3118d21f6684788510496bf2c 100644 |
| --- a/webrtc/modules/audio_processing/audio_processing_impl.h |
| +++ b/webrtc/modules/audio_processing/audio_processing_impl.h |
| @@ -47,12 +47,12 @@ class AudioProcessingImpl : public AudioProcessing { |
| AudioProcessingImpl(const Config& config, NonlinearBeamformer* beamformer); |
| ~AudioProcessingImpl() override; |
| int Initialize() override; |
| - int Initialize(int input_sample_rate_hz, |
| - int output_sample_rate_hz, |
| + int Initialize(int capture_input_sample_rate_hz, |
| + int capture_output_sample_rate_hz, |
| int reverse_sample_rate_hz, |
|
the sun
2016/09/14 09:40:32
me too!
peah-webrtc
2016/09/16 08:26:28
Awesome!
Done.
|
| - ChannelLayout input_layout, |
| - ChannelLayout output_layout, |
| - ChannelLayout reverse_layout) override; |
| + ChannelLayout capture_input_layout, |
| + ChannelLayout capture_output_layout, |
| + ChannelLayout render_input_layout) override; |
| int Initialize(const ProcessingConfig& processing_config) override; |
| void SetExtraOptions(const Config& config) override; |
| void UpdateHistogramsOnCallEnd() override; |
| @@ -91,8 +91,8 @@ class AudioProcessingImpl : public AudioProcessing { |
| int sample_rate_hz, |
| ChannelLayout layout) override; |
| int ProcessReverseStream(const float* const* src, |
| - const StreamConfig& reverse_input_config, |
| - const StreamConfig& reverse_output_config, |
| + const StreamConfig& input_config, |
| + const StreamConfig& output_config, |
| float* const* dest) override; |
| // Methods only accessed from APM submodules or |
| @@ -212,35 +212,19 @@ class AudioProcessingImpl : public AudioProcessing { |
| // Methods requiring APM running in a single-threaded manner. |
| // Are called with both the render and capture locks already |
| // acquired. |
| - void InitializeExperimentalAgc() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| void InitializeTransient() |
| EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| void InitializeBeamformer() |
| EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| void InitializeIntelligibility() |
| EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| - void InitializeHighPassFilter() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| - void InitializeNoiseSuppression() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| - void InitializeLevelEstimator() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| - void InitializeVoiceDetection() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| - void InitializeEchoCanceller() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| - void InitializeGainController() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| - void InitializeEchoControlMobile() |
| - EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| int InitializeLocked(const ProcessingConfig& config) |
| EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
| void InitializeLevelController() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| // Capture-side exclusive methods possibly running APM in a multi-threaded |
| // manner that are called with the render lock already acquired. |
| - int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| + int ProcessCaptureStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
| // Render-side exclusive methods possibly running APM in a multi-threaded |
| @@ -250,7 +234,7 @@ class AudioProcessingImpl : public AudioProcessing { |
| const StreamConfig& input_config, |
| const StreamConfig& output_config) |
| EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
| - int ProcessReverseStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
| + int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
| // Debug dump methods that are internal and called without locks. |
| // TODO(peah): Make thread safe. |
| @@ -300,9 +284,9 @@ class AudioProcessingImpl : public AudioProcessing { |
| {kSampleRate16kHz, 1, false}, |
| {kSampleRate16kHz, 1, false}, |
| {kSampleRate16kHz, 1, false}}}), |
| - rev_proc_format(kSampleRate16kHz, 1) {} |
| + render_processing_format(kSampleRate16kHz, 1) {} |
| ProcessingConfig api_format; |
| - StreamConfig rev_proc_format; |
| + StreamConfig render_processing_format; |
| } formats_; |
| // APM constants. |
| @@ -332,10 +316,10 @@ class AudioProcessingImpl : public AudioProcessing { |
| std::vector<Point> array_geometry; |
| SphericalPointf target_direction; |
| std::unique_ptr<AudioBuffer> capture_audio; |
| - // Only the rate and samples fields of fwd_proc_format_ are used because the |
| - // forward processing number of channels is mutable and is tracked by the |
| - // capture_audio_. |
| - StreamConfig fwd_proc_format; |
| + // Only the rate and samples fields of capture_processing_format_ are used |
| + // because the forward processing number of channels is mutable and is |
|
the sun
2016/09/14 09:40:32
forward -> capture
peah-webrtc
2016/09/16 08:26:28
Done.
|
| + // tracked by the capture_audio_. |
| + StreamConfig capture_processing_format; |
| int split_rate; |
| } capture_ GUARDED_BY(crit_capture_); |
| @@ -343,16 +327,17 @@ class AudioProcessingImpl : public AudioProcessing { |
| ApmCaptureNonLockedState(bool beamformer_enabled, |
| bool intelligibility_enabled, |
| bool level_controller_enabled) |
| - : fwd_proc_format(kSampleRate16kHz), |
| + : capture_processing_format(kSampleRate16kHz), |
| split_rate(kSampleRate16kHz), |
| stream_delay_ms(0), |
| beamformer_enabled(beamformer_enabled), |
| intelligibility_enabled(intelligibility_enabled), |
| level_controller_enabled(level_controller_enabled) {} |
| - // Only the rate and samples fields of fwd_proc_format_ are used because the |
| + // Only the rate and samples fields of capture_processing_format_ are used |
| + // because the |
|
the sun
2016/09/14 09:40:32
fix formatting
peah-webrtc
2016/09/16 08:26:28
Ouch. I now did a proper cl format on it.
Done.
|
| // forward processing number of channels is mutable and is tracked by the |
| // capture_audio_. |
| - StreamConfig fwd_proc_format; |
| + StreamConfig capture_processing_format; |
| int split_rate; |
| int stream_delay_ms; |
| bool beamformer_enabled; |