ACM: Make AcmReceiver's ownership of NetEq more obvious

Bug: None
Change-Id: Iff544940fcbd651c967771c209c8c0c3aaeda9a1
Reviewed-on: https://chromium-review.googlesource.com/533073
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18607}
This commit is contained in:
Henrik Lundin 2017-06-14 14:13:02 +02:00 committed by Commit Bot
parent f9784f23d7
commit 6af9399117
2 changed files with 2 additions and 4 deletions

View File

@ -41,9 +41,7 @@ AcmReceiver::AcmReceiver(const AudioCodingModule::Config& config)
memset(last_audio_buffer_.get(), 0, AudioFrame::kMaxDataSizeSamples);
}
AcmReceiver::~AcmReceiver() {
delete neteq_;
}
AcmReceiver::~AcmReceiver() = default;
int AcmReceiver::SetMinimumDelay(int delay_ms) {
if (neteq_->SetMinimumDelay(delay_ms))

View File

@ -281,7 +281,7 @@ class AcmReceiver {
ACMResampler resampler_ GUARDED_BY(crit_sect_);
std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_);
CallStatistics call_stats_ GUARDED_BY(crit_sect_);
NetEq* neteq_;
const std::unique_ptr<NetEq> neteq_; // NetEq is thread-safe; no lock needed.
const Clock* const clock_;
bool resampled_last_output_frame_ GUARDED_BY(crit_sect_);
rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_);