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

Side by Side Diff: webrtc/modules/audio_processing/aec_dump/capture_stream_info.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 28 matching lines...) Expand all
39 stream->add_output_channel(channel_view.begin(), 39 stream->add_output_channel(channel_view.begin(),
40 sizeof(float) * channel_view.size()); 40 sizeof(float) * channel_view.size());
41 } 41 }
42 } 42 }
43 43
44 void CaptureStreamInfo::AddInput(const AudioFrame& frame) { 44 void CaptureStreamInfo::AddInput(const AudioFrame& frame) {
45 RTC_DCHECK(task_); 45 RTC_DCHECK(task_);
46 auto* stream = task_->GetEvent()->mutable_stream(); 46 auto* stream = task_->GetEvent()->mutable_stream();
47 const size_t data_size = 47 const size_t data_size =
48 sizeof(int16_t) * frame.samples_per_channel_ * frame.num_channels_; 48 sizeof(int16_t) * frame.samples_per_channel_ * frame.num_channels_;
49 stream->set_input_data(frame.data_, data_size); 49 stream->set_input_data(frame.data(), data_size);
50 } 50 }
51 51
52 void CaptureStreamInfo::AddOutput(const AudioFrame& frame) { 52 void CaptureStreamInfo::AddOutput(const AudioFrame& frame) {
53 RTC_DCHECK(task_); 53 RTC_DCHECK(task_);
54 auto* stream = task_->GetEvent()->mutable_stream(); 54 auto* stream = task_->GetEvent()->mutable_stream();
55 const size_t data_size = 55 const size_t data_size =
56 sizeof(int16_t) * frame.samples_per_channel_ * frame.num_channels_; 56 sizeof(int16_t) * frame.samples_per_channel_ * frame.num_channels_;
57 stream->set_output_data(frame.data_, data_size); 57 stream->set_output_data(frame.data(), data_size);
58 } 58 }
59 59
60 void CaptureStreamInfo::AddAudioProcessingState( 60 void CaptureStreamInfo::AddAudioProcessingState(
61 const AecDump::AudioProcessingState& state) { 61 const AecDump::AudioProcessingState& state) {
62 RTC_DCHECK(task_); 62 RTC_DCHECK(task_);
63 auto* stream = task_->GetEvent()->mutable_stream(); 63 auto* stream = task_->GetEvent()->mutable_stream();
64 stream->set_delay(state.delay); 64 stream->set_delay(state.delay);
65 stream->set_drift(state.drift); 65 stream->set_drift(state.drift);
66 stream->set_level(state.level); 66 stream->set_level(state.level);
67 stream->set_keypress(state.keypress); 67 stream->set_keypress(state.keypress);
68 } 68 }
69 } // namespace webrtc 69 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aec_dump/aec_dump_impl.cc ('k') | webrtc/modules/audio_processing/audio_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698