| Index: content/renderer/media/webrtc_audio_device_impl.cc
|
| diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
|
| index c3ef160808f2464e57b69a3b5d71614943463d98..0946ab2bd046b3c95825c1edad3e347cff6c0da3 100644
|
| --- a/content/renderer/media/webrtc_audio_device_impl.cc
|
| +++ b/content/renderer/media/webrtc_audio_device_impl.cc
|
| @@ -174,7 +174,7 @@ int32_t WebRtcAudioDeviceImpl::Release() {
|
| }
|
|
|
| int WebRtcAudioDeviceImpl::Render(
|
| - const std::vector<float*>& audio_data,
|
| + media::AudioBus* audio_bus,
|
| int number_of_frames,
|
| int audio_delay_milliseconds) {
|
| DCHECK_LE(number_of_frames, output_buffer_size());
|
| @@ -185,7 +185,7 @@ int WebRtcAudioDeviceImpl::Render(
|
| output_delay_ms_ = audio_delay_milliseconds;
|
| }
|
|
|
| - const int channels = audio_data.size();
|
| + const int channels = audio_bus->channels();
|
| DCHECK_LE(channels, output_channels());
|
|
|
| int samples_per_sec = output_sample_rate();
|
| @@ -222,7 +222,7 @@ int WebRtcAudioDeviceImpl::Render(
|
| for (int channel_index = 0; channel_index < channels; ++channel_index) {
|
| media::DeinterleaveAudioChannel(
|
| output_buffer_.get(),
|
| - audio_data[channel_index],
|
| + audio_bus->channel(channel_index),
|
| channels,
|
| channel_index,
|
| bytes_per_sample_,
|
| @@ -237,7 +237,7 @@ void WebRtcAudioDeviceImpl::OnRenderError() {
|
| LOG(ERROR) << "OnRenderError()";
|
| }
|
|
|
| -void WebRtcAudioDeviceImpl::Capture(const std::vector<float*>& audio_data,
|
| +void WebRtcAudioDeviceImpl::Capture(media::AudioBus* audio_bus,
|
| int number_of_frames,
|
| int audio_delay_milliseconds,
|
| double volume) {
|
| @@ -261,13 +261,13 @@ void WebRtcAudioDeviceImpl::Capture(const std::vector<float*>& audio_data,
|
| output_delay_ms = output_delay_ms_;
|
| }
|
|
|
| - const int channels = audio_data.size();
|
| + const int channels = audio_bus->channels();
|
| DCHECK_LE(channels, input_channels());
|
| uint32_t new_mic_level = 0;
|
|
|
| // Interleave, scale, and clip input to int and store result in
|
| // a local byte buffer.
|
| - media::InterleaveFloatToInt(audio_data,
|
| + media::InterleaveFloatToInt(*audio_bus,
|
| input_buffer_.get(),
|
| number_of_frames,
|
| input_audio_parameters_.bits_per_sample() / 8);
|
|
|