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

Unified Diff: media/audio/audio_input_device.cc

Issue 510913005: Add native log and uma stat when all input shared memory buffers are full (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
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_];

Powered by Google App Engine
This is Rietveld 408576698