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

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

Issue 554733002: Add support for 24kHz audio sample rate and remove the validation check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/renderer/media/webrtc_audio_capturer.cc ('k') | media/audio/sample_rates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 222fe76209484b00fdf77c3f723344190bfa87b9..24eee9a746613b95d858b47f355433ecd70b5ce6 100644
--- a/content/renderer/media/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc_audio_renderer.cc
@@ -29,24 +29,6 @@ namespace content {
namespace {
-// Supported hardware sample rates for output sides.
-#if defined(OS_WIN) || defined(OS_MACOSX)
-// AudioHardwareConfig::GetOutputSampleRate() asks the audio layer for its
-// current sample rate (set by the user) on Windows and Mac OS X. The listed
-// rates below adds restrictions and Initialize() will fail if the user selects
-// any rate outside these ranges.
-const int kValidOutputRates[] = {96000, 48000, 44100, 32000, 16000};
-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
-const int kValidOutputRates[] = {48000, 44100};
-#elif defined(OS_ANDROID)
-// TODO(leozwang): We want to use native sampling rate on Android to achieve
-// low latency, currently 16000 is used to work around audio problem on some
-// Android devices.
-const int kValidOutputRates[] = {48000, 44100, 16000};
-#else
-const int kValidOutputRates[] = {44100};
-#endif
-
// This is a simple wrapper class that's handed out to users of a shared
// WebRtcAudioRenderer instance. This class maintains the per-user 'playing'
// and 'started' states to avoid problems related to incorrect usage which
@@ -254,16 +236,6 @@ bool WebRtcAudioRenderer::Initialize(WebRtcAudioRendererSource* source) {
sample_rate);
}
- // Verify that the reported output hardware sample rate is supported
- // on the current platform.
- if (std::find(&kValidOutputRates[0],
- &kValidOutputRates[0] + arraysize(kValidOutputRates),
- sample_rate) ==
- &kValidOutputRates[arraysize(kValidOutputRates)]) {
- DLOG(ERROR) << sample_rate << " is not a supported output rate.";
- return false;
- }
-
// Set up audio parameters for the source, i.e., the WebRTC client.
// The WebRTC client only supports multiples of 10ms as buffer size where
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | media/audio/sample_rates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698