Index: content/renderer/media/media_stream_audio_level_calculator.h |
diff --git a/content/renderer/media/media_stream_audio_level_calculator.h b/content/renderer/media/media_stream_audio_level_calculator.h |
index 41c9c34f7be1b2f803941ca2429417ddc8eb4fdc..48dda4ce0dbe70f02aa88f78cee1c776c526fe71 100644 |
--- a/content/renderer/media/media_stream_audio_level_calculator.h |
+++ b/content/renderer/media/media_stream_audio_level_calculator.h |
@@ -21,8 +21,14 @@ class MediaStreamAudioLevelCalculator { |
// Calculates the signal level of the audio data. |
// Returns the absolute value of the amplitude of the signal. |
+ // |force_report_nonzero_energy| is a flag forcing the calculator to |
+ // report nonzero energy even if the energy of the processed audio is zero. |
+ // Since |audio_data| is post processed data, and the audio processing might |
+ // zero all the audio data, when the caller detects the pre processed data |
+ // contain energy, it could pass |force_report_nonzero_energy| as true to |
+ // force calculator to report 1 as energy when |audio_data| is all zero. |
int Calculate(const int16* audio_data, int number_of_channels, |
- int number_of_frames); |
+ int number_of_frames, bool force_report_nonzero_energy); |
private: |
// Used to DCHECK that the constructor and Calculate() are always called on |