Chromium Code Reviews| Index: media/audio/audio_input_device.cc |
| diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc |
| index bf140cbad4e83b42d152a8556be0d72fc59922d6..17cd4e8734bd2e36585923dfcb84ec5ce1613cda 100644 |
| --- a/media/audio/audio_input_device.cc |
| +++ b/media/audio/audio_input_device.cc |
| @@ -309,6 +309,10 @@ void AudioInputDevice::AudioThreadCallback::Process(int pending_data) { |
| double volume = buffer->params.volume; |
| bool key_pressed = buffer->params.key_pressed; |
| + // Reset the size of the buffer to 0 to notify the browser that |
| + // the buffer has been consumed. |
| + buffer->params.size = 0; |
|
tommi (sloooow) - chröme
2014/08/29 09:16:43
do we have unit tests?
no longer working on chromium
2014/08/29 11:15:20
Unfortunately we don't have unittest for this shar
|
| + |
| // Use pre-allocated audio bus wrapping existing block of shared memory. |
| media::AudioBus* audio_bus = audio_buses_[current_segment_id_]; |