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

Unified Diff: media/audio/cras/cras_input.cc

Issue 15563004: Improved AGC update scheme for the audio backend in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added Start/Stop APIs for the AGC part Created 7 years, 7 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
« no previous file with comments | « media/audio/cras/cras_input.h ('k') | media/audio/linux/alsa_input.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/cras/cras_input.cc
diff --git a/media/audio/cras/cras_input.cc b/media/audio/cras/cras_input.cc
index aa398b6575b3f9d2366d74a61634a59104d9277c..c080ac6b3e6586954eadce197f0374e05b5665e6 100644
--- a/media/audio/cras/cras_input.cc
+++ b/media/audio/cras/cras_input.cc
@@ -107,6 +107,8 @@ void CrasInputStream::Start(AudioInputCallback* callback) {
if (started_)
return;
+ StartAgc();
+
callback_ = callback;
LOG(ERROR) << "Input Start";
@@ -169,6 +171,8 @@ void CrasInputStream::Stop() {
if (!callback_ || !started_)
return;
+ StopAgc();
+
// Removing the stream from the client stops audio.
cras_client_rm_stream(client_, stream_id_);
@@ -222,7 +226,7 @@ void CrasInputStream::ReadAudio(size_t frames,
// also updated each time SetVolume() is called through IPC by the
// render-side AGC.
double normalized_volume = 0.0;
- QueryAgcVolume(&normalized_volume);
+ GetAgcVolume(&normalized_volume);
callback_->OnData(this,
buffer,
« no previous file with comments | « media/audio/cras/cras_input.h ('k') | media/audio/linux/alsa_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698