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

Unified Diff: trunk/src/content/renderer/media/media_stream_audio_processor.h

Issue 148213002: Revert 246905 "Revert 246894 "Wire up AGC to the MediaStreamAudi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | « no previous file | trunk/src/content/renderer/media/media_stream_audio_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/renderer/media/media_stream_audio_processor.h
===================================================================
--- trunk/src/content/renderer/media/media_stream_audio_processor.h (revision 247207)
+++ trunk/src/content/renderer/media/media_stream_audio_processor.h (working copy)
@@ -63,6 +63,9 @@
// the post-processed data if the method is returning a true. The lifetime
// of the data represeted by |out| is guaranteed to outlive the method call.
// That also says *|out| won't change until this method is called again.
+ // |new_volume| receives the new microphone volume from the AGC.
+ // The new microphoen volume range is [0, 255], and the value will be 0 if
+ // the microphone volume should not be adjusted.
// Returns true if the internal FIFO has at least 10 ms data for processing,
// otherwise false.
// |capture_delay|, |volume| and |key_pressed| will be passed to
@@ -71,6 +74,7 @@
bool ProcessAndConsumeData(base::TimeDelta capture_delay,
int volume,
bool key_pressed,
+ int* new_volume,
int16** out);
@@ -88,6 +92,8 @@
virtual ~MediaStreamAudioProcessor();
private:
+ friend class MediaStreamAudioProcessorTest;
+
class MediaStreamAudioConverter;
// Helper to initialize the WebRtc AudioProcessing.
@@ -103,10 +109,12 @@
int frames_per_buffer);
// Called by ProcessAndConsumeData().
- void ProcessData(webrtc::AudioFrame* audio_frame,
- base::TimeDelta capture_delay,
- int volume,
- bool key_pressed);
+ // Returns the new microphone volume in the range of |0, 255].
+ // When the volume does not need to be updated, it returns 0.
+ int ProcessData(webrtc::AudioFrame* audio_frame,
+ base::TimeDelta capture_delay,
+ int volume,
+ bool key_pressed);
// Called when the processor is going away.
void StopAudioProcessing();
@@ -143,6 +151,9 @@
// Used to DCHECK that PushRenderData() is called on the render audio thread.
base::ThreadChecker render_thread_checker_;
+
+ // Flag to enable the stereo channels mirroring.
+ bool audio_mirroring_;
};
} // namespace content
« no previous file with comments | « no previous file | trunk/src/content/renderer/media/media_stream_audio_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698