| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |