Index: content/renderer/media/webrtc_audio_renderer.cc |
diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc |
index 825a4e8f456220e8b3bca75a77474df9763c135c..d3e866d5358bfb2b7005014d30650ece3a0c17fe 100644 |
--- a/content/renderer/media/webrtc_audio_renderer.cc |
+++ b/content/renderer/media/webrtc_audio_renderer.cc |
@@ -222,10 +222,10 @@ bool WebRtcAudioRenderer::Initialize(WebRtcAudioRendererSource* source) { |
DVLOG(1) << "Resampling from 48000 to 192000 is required"; |
sample_rate = 48000; |
} |
- media::AudioSampleRate asr = media::AsAudioSampleRate(sample_rate); |
- if (asr != media::kUnexpectedAudioSampleRate) { |
+ media::AudioSampleRate asr; |
+ if (media::ToAudioSampleRate(sample_rate, &asr)) { |
UMA_HISTOGRAM_ENUMERATION( |
- "WebRTC.AudioOutputSampleRate", asr, media::kUnexpectedAudioSampleRate); |
+ "WebRTC.AudioOutputSampleRate", asr, media::kAudioSampleRateMax + 1); |
} else { |
UMA_HISTOGRAM_COUNTS("WebRTC.AudioOutputSampleRateUnexpected", sample_rate); |
} |
@@ -330,7 +330,7 @@ bool WebRtcAudioRenderer::Initialize(WebRtcAudioRendererSource* source) { |
UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputChannelLayout", |
source_params.channel_layout(), |
- media::CHANNEL_LAYOUT_MAX); |
+ media::CHANNEL_LAYOUT_MAX + 1); |
UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputFramesPerBuffer", |
source_params.frames_per_buffer(), |
kUnexpectedAudioBufferSize); |