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

Side by Side Diff: webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: Update new usages of AudioFrame::data_ Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 void AecDumpImpl::WriteRenderStreamMessage(const AudioFrame& frame) { 125 void AecDumpImpl::WriteRenderStreamMessage(const AudioFrame& frame) {
126 auto task = CreateWriteToFileTask(); 126 auto task = CreateWriteToFileTask();
127 auto* event = task->GetEvent(); 127 auto* event = task->GetEvent();
128 128
129 event->set_type(audioproc::Event::REVERSE_STREAM); 129 event->set_type(audioproc::Event::REVERSE_STREAM);
130 audioproc::ReverseStream* msg = event->mutable_reverse_stream(); 130 audioproc::ReverseStream* msg = event->mutable_reverse_stream();
131 const size_t data_size = 131 const size_t data_size =
132 sizeof(int16_t) * frame.samples_per_channel_ * frame.num_channels_; 132 sizeof(int16_t) * frame.samples_per_channel_ * frame.num_channels_;
133 msg->set_data(frame.data_, data_size); 133 msg->set_data(frame.data(), data_size);
134 134
135 worker_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>(std::move(task))); 135 worker_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>(std::move(task)));
136 } 136 }
137 137
138 void AecDumpImpl::WriteRenderStreamMessage(const FloatAudioFrame& src) { 138 void AecDumpImpl::WriteRenderStreamMessage(const FloatAudioFrame& src) {
139 auto task = CreateWriteToFileTask(); 139 auto task = CreateWriteToFileTask();
140 auto* event = task->GetEvent(); 140 auto* event = task->GetEvent();
141 141
142 event->set_type(audioproc::Event::REVERSE_STREAM); 142 event->set_type(audioproc::Event::REVERSE_STREAM);
143 143
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 RTC_DCHECK(worker_queue); 199 RTC_DCHECK(worker_queue);
200 RTC_DCHECK(handle); 200 RTC_DCHECK(handle);
201 std::unique_ptr<FileWrapper> debug_file(FileWrapper::Create()); 201 std::unique_ptr<FileWrapper> debug_file(FileWrapper::Create());
202 if (!debug_file->OpenFromFileHandle(handle)) { 202 if (!debug_file->OpenFromFileHandle(handle)) {
203 return nullptr; 203 return nullptr;
204 } 204 }
205 return rtc::MakeUnique<AecDumpImpl>(std::move(debug_file), max_log_size_bytes, 205 return rtc::MakeUnique<AecDumpImpl>(std::move(debug_file), max_log_size_bytes,
206 worker_queue); 206 worker_queue);
207 } 207 }
208 } // namespace webrtc 208 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/sine_wave_generator.cc ('k') | webrtc/modules/audio_processing/aec_dump/capture_stream_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698