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

Unified Diff: media/audio/sample_rates.h

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 10 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/sample_rates.h
diff --git a/media/audio/sample_rates.h b/media/audio/sample_rates.h
index 7c29e548b340e385512eedf82821a0f9f15f7060..482ec0fdc8b2fcbbe25d3b46e58058fd25ca2a7d 100644
--- a/media/audio/sample_rates.h
+++ b/media/audio/sample_rates.h
@@ -23,12 +23,13 @@ enum AudioSampleRate {
k88200Hz = 8,
k176400Hz = 9,
k192000Hz = 10,
- kUnexpectedAudioSampleRate // Must always be last!
+ // Must always equal the largest value ever reported:
+ kAudioSampleRateMax = k192000Hz,
};
// Helper method to convert integral values to their respective enum values,
-// or kUnexpectedAudioSampleRate if no match exists.
-MEDIA_EXPORT AudioSampleRate AsAudioSampleRate(int sample_rate);
+// returns false for unexpected sample rates.
+MEDIA_EXPORT bool ToAudioSampleRate(int sample_rate, AudioSampleRate* asr);
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698