Index: content/renderer/media/media_stream_audio_processor.h |
diff --git a/content/renderer/media/media_stream_audio_processor.h b/content/renderer/media/media_stream_audio_processor.h |
index be5b8b0409ea82d73e22cab068a0dbe8ce68282e..53adea23c1baecc3a4d48c123476d8cbb5f32ea6 100644 |
--- a/content/renderer/media/media_stream_audio_processor.h |
+++ b/content/renderer/media/media_stream_audio_processor.h |
@@ -63,6 +63,8 @@ class CONTENT_EXPORT MediaStreamAudioProcessor : |
// 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| contains the new microphone volume from the AGC, the value |
+ // will be 0 if the microphone volume is not adjusted. |
tommi (sloooow) - chröme
2014/01/21 15:06:20
nit:
// |new_volume| receives the new microphone v
no longer working on chromium
2014/01/23 12:46:08
Done.
|
// 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 +73,7 @@ class CONTENT_EXPORT MediaStreamAudioProcessor : |
bool ProcessAndConsumeData(base::TimeDelta capture_delay, |
int volume, |
bool key_pressed, |
+ int* new_volume, |
int16** out); |
@@ -88,6 +91,8 @@ class CONTENT_EXPORT MediaStreamAudioProcessor : |
virtual ~MediaStreamAudioProcessor(); |
private: |
+ friend class MediaStreamAudioProcessorTest; |
+ |
class MediaStreamAudioConverter; |
// Helper to initialize the WebRtc AudioProcessing. |
@@ -103,10 +108,12 @@ class CONTENT_EXPORT MediaStreamAudioProcessor : |
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 +150,9 @@ class CONTENT_EXPORT MediaStreamAudioProcessor : |
// Used to DCHECK that PushRenderData() is called on the render audio thread. |
base::ThreadChecker render_thread_checker_; |
+ |
+ // Flag to enable the stereo channels swapping. |
+ bool stereo_channels_swapping_; |
tommi (sloooow) - chröme
2014/01/21 15:06:20
nit: audio_mirroring_
no longer working on chromium
2014/01/23 12:46:08
Done.
|
}; |
} // namespace content |