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

Unified Diff: media/audio/win/wavein_input_win.cc

Issue 9702019: Adds Analog Gain Control (AGC) to the WebRTC client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improved volume updating on Mac Created 8 years, 9 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/win/wavein_input_win.cc
diff --git a/media/audio/win/wavein_input_win.cc b/media/audio/win/wavein_input_win.cc
index cd9febc6322baf7df39c15ee7907e46b85303b3c..10a70d97e8ebd4703f5e57957ca55f33aaa35dd3 100644
--- a/media/audio/win/wavein_input_win.cc
+++ b/media/audio/win/wavein_input_win.cc
@@ -201,6 +201,17 @@ double PCMWaveInAudioInputStream::GetVolume() {
return 0.0;
}
+void PCMWaveInAudioInputStream::SetAutomaticGainControl(bool enabled) {
+ // TODO(henrika): Add AGC support when volume control has been added.
+ NOTIMPLEMENTED();
+}
+
+bool PCMWaveInAudioInputStream::GetAutomaticGainControl() {
+ // TODO(henrika): Add AGC support when volume control has been added.
+ NOTIMPLEMENTED();
+ return false;
+}
+
void PCMWaveInAudioInputStream::HandleError(MMRESULT error) {
DLOG(WARNING) << "PCMWaveInAudio error " << error;
callback_->OnError(this, error);
@@ -260,10 +271,12 @@ void PCMWaveInAudioInputStream::WaveCallback(HWAVEIN hwi, UINT msg,
// to the callback and check if we need to stop playing.
// It should be OK to assume the data in the buffer is what has been
// recorded in the soundcard.
+ // TODO(henrika): comment on volume = 0.0.
WAVEHDR* buffer = reinterpret_cast<WAVEHDR*>(param1);
obj->callback_->OnData(obj, reinterpret_cast<const uint8*>(buffer->lpData),
buffer->dwBytesRecorded,
- buffer->dwBytesRecorded);
+ buffer->dwBytesRecorded,
+ 0.0);
if (obj->state_ == kStateStopping) {
// The main thread has called Stop() and is waiting to issue waveOutReset
« media/audio/win/audio_low_latency_input_win.cc ('K') | « media/audio/win/wavein_input_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698