| Index: media/audio/audio_input_device.cc
|
| diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc
|
| index 401042acf26d8cded7a7f25fd12611a238620a61..b1ab6f8266fd4819201028a310391071179f4a8a 100644
|
| --- a/media/audio/audio_input_device.cc
|
| +++ b/media/audio/audio_input_device.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/time.h"
|
| #include "media/audio/audio_manager_base.h"
|
| #include "media/audio/audio_util.h"
|
| +#include "media/base/audio_bus.h"
|
|
|
| namespace media {
|
|
|
| @@ -328,24 +329,23 @@ void AudioInputDevice::AudioThreadCallback::Process(int pending_data) {
|
|
|
| int audio_delay_milliseconds = pending_data / bytes_per_ms_;
|
| int16* memory = reinterpret_cast<int16*>(&buffer->audio[0]);
|
| - const size_t number_of_frames = audio_parameters_.frames_per_buffer();
|
| const int bytes_per_sample = sizeof(memory[0]);
|
|
|
| // Deinterleave each channel and convert to 32-bit floating-point
|
| // with nominal range -1.0 -> +1.0.
|
| - for (int channel_index = 0; channel_index < audio_parameters_.channels();
|
| + for (int channel_index = 0; channel_index < audio_bus_->channels();
|
| ++channel_index) {
|
| DeinterleaveAudioChannel(memory,
|
| - audio_data_[channel_index],
|
| - audio_parameters_.channels(),
|
| + audio_bus_->channel(channel_index),
|
| + audio_bus_->channels(),
|
| channel_index,
|
| bytes_per_sample,
|
| - number_of_frames);
|
| + audio_bus_->frames());
|
| }
|
|
|
| // Deliver captured data to the client in floating point format
|
| // and update the audio-delay measurement.
|
| - capture_callback_->Capture(audio_data_, number_of_frames,
|
| + capture_callback_->Capture(audio_bus_.get(),
|
| audio_delay_milliseconds, volume);
|
| }
|
|
|
|
|