Removed the dependency on AudioProcessingImpl in EchoControlMobileImpl

BUG=webrtc:5351

Review URL: https://codereview.webrtc.org/1803433003

Cr-Commit-Position: refs/heads/master@{#11995}
This commit is contained in:
peah
2016-03-15 04:32:28 -07:00
committed by Commit bot
parent b8fbb54291
commit 253534d1bd
3 changed files with 81 additions and 46 deletions

View File

@ -25,27 +25,29 @@ class AudioBuffer;
class EchoControlMobileImpl : public EchoControlMobile {
public:
EchoControlMobileImpl(const AudioProcessing* apm,
rtc::CriticalSection* crit_render,
EchoControlMobileImpl(rtc::CriticalSection* crit_render,
rtc::CriticalSection* crit_capture);
virtual ~EchoControlMobileImpl();
int ProcessRenderAudio(const AudioBuffer* audio);
int ProcessCaptureAudio(AudioBuffer* audio);
int ProcessCaptureAudio(AudioBuffer* audio, int stream_delay_ms);
// EchoControlMobile implementation.
bool is_enabled() const override;
RoutingMode routing_mode() const override;
bool is_comfort_noise_enabled() const override;
void Initialize();
void Initialize(int sample_rate_hz,
size_t num_reverse_channels,
size_t num_output_channels);
// Reads render side data that has been queued on the render call.
void ReadQueuedRenderData();
private:
class Canceller;
struct StreamProperties;
// EchoControlMobile implementation.
int Enable(bool enable) override;
@ -59,9 +61,6 @@ class EchoControlMobileImpl : public EchoControlMobile {
void AllocateRenderQueue();
int Configure();
// Not guarded as its public API is thread safe.
const AudioProcessing* apm_;
rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
rtc::CriticalSection* const crit_capture_;
@ -84,6 +83,8 @@ class EchoControlMobileImpl : public EchoControlMobile {
render_signal_queue_;
std::vector<std::unique_ptr<Canceller>> cancellers_;
std::unique_ptr<StreamProperties> stream_properties_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoControlMobileImpl);
};
} // namespace webrtc