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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 1377103002: Add sample rates checking in MediaStreamAudioProcessor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittest updated Created 5 years, 2 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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index 23547d1b2b6490331f28d0110284f523044e1d57..ed94baa3ec0f4b6ad32bd34c04e3fda9157b45fd 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -137,7 +137,8 @@ class MediaStreamAudioFifo {
new MediaStreamAudioBus(destination_channels, destination_frames)),
data_available_(false) {
DCHECK_GE(source_channels, destination_channels);
- DCHECK_GT(sample_rate_, 0);
+ DCHECK_GE(sample_rate_, 8000);
+ DCHECK_LE(sample_rate_, 48000);
if (source_channels > destination_channels) {
audio_source_intermediate_ =
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698