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

Unified Diff: remoting/host/audio_silence_detector.h

Issue 2840773004: [Chromoting] Add AudioVolumeApplier to reduce the complexity and the dependency of kChannels (Closed)
Patch Set: Resolve review comments Created 3 years, 8 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: remoting/host/audio_silence_detector.h
diff --git a/remoting/host/audio_silence_detector.h b/remoting/host/audio_silence_detector.h
index 95fd6546bac5a71fe93f0a1dad483ce6ba088e1f..3e7a05bf16fabc5c2796c24c954a00a358357222 100644
--- a/remoting/host/audio_silence_detector.h
+++ b/remoting/host/audio_silence_detector.h
@@ -24,7 +24,10 @@ class AudioSilenceDetector {
// Must be called for each new chunk of data. Return true the given packet
// is silence should be dropped.
- bool IsSilence(const int16_t* samples, size_t samples_count);
+ bool IsSilence(const int16_t* samples, size_t frames);
+
+ // The count of channels received from last Reset().
+ int channels() const;
private:
// Maximum absolute sample value that should still be considered as silence.
@@ -37,6 +40,9 @@ class AudioSilenceDetector {
// Lengths of the current silence period in samples.
int silence_length_;
+
+ // The count of channels.
+ int channels_;
};
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698