Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: webrtc/modules/audio_processing/audio_buffer.cc

Issue 1982183002: Pull out the PostFilter to its own NonlinearBeamformer API (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change Beamformer::ProcessChunk() to have one parameter Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/audio_buffer.cc
diff --git a/webrtc/modules/audio_processing/audio_buffer.cc b/webrtc/modules/audio_processing/audio_buffer.cc
index f9b9f631d2b813523ed4a9935ecbc3c0af2ab3bd..13ece67f254f9fcdc5115a58db28e9de411954f5 100644
--- a/webrtc/modules/audio_processing/audio_buffer.cc
+++ b/webrtc/modules/audio_processing/audio_buffer.cc
@@ -184,6 +184,10 @@ void AudioBuffer::InitForNewData() {
reference_copied_ = false;
activity_ = AudioFrame::kVadUnknown;
num_channels_ = num_proc_channels_;
+ data_->set_num_channels(num_proc_channels_);
peah-webrtc 2016/06/01 14:51:01 Could you please explain why this change is needed
aluebs-webrtc 2016/06/01 22:13:20 To re-init the ChannelBuffers to their original nu
peah-webrtc 2016/06/08 12:04:55 I still don't understand why this change is needed
aluebs-webrtc 2016/06/09 02:11:46 Acknowledged.
+ if (split_data_.get()) {
+ split_data_->set_num_channels(num_proc_channels_);
+ }
}
const int16_t* const* AudioBuffer::channels_const() const {
@@ -345,6 +349,10 @@ size_t AudioBuffer::num_channels() const {
void AudioBuffer::set_num_channels(size_t num_channels) {
num_channels_ = num_channels;
+ data_->set_num_channels(num_channels);
+ if (split_data_.get()) {
peah-webrtc 2016/06/01 14:51:01 Could you please explain why this change is needed
aluebs-webrtc 2016/06/01 22:13:20 To change the ChannelBuffers to the new number of
+ split_data_->set_num_channels(num_channels);
+ }
}
size_t AudioBuffer::num_frames() const {

Powered by Google App Engine
This is Rietveld 408576698