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

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 AGC comments 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 f8a4e7ded95e184b53eda5b64dae63ff8ce979b7..90cec5383efeec2240df9df451ae4ad1eaf2a398 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.
tommi (sloooow) - chröme 2012/03/26 15:26:40 ping
henrika (OOO until Aug 14) 2012/03/27 09:20:38 Done.
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

Powered by Google App Engine
This is Rietveld 408576698