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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: made the GetPreferredOutputStreamParameters protected Created 7 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: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 4a0e1caf793401382218d8437f5fc448ef921e09..3adfaf4eaf53b63ee4a685221bb74b1bc2374fce 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -25,7 +25,7 @@
#include "content/public/common/media_stream_request.h"
#include "googleurl/src/gurl.h"
#include "media/audio/audio_manager_base.h"
-#include "media/audio/audio_util.h"
+#include "media/audio/audio_parameters.h"
#include "media/base/channel_layout.h"
#if defined(OS_WIN)
@@ -852,7 +852,9 @@ void MediaStreamManager::DevicesAccepted(const std::string& label,
// mirroring, we don't go through EnumerateDevices where these are usually
// initialized.
if (device_info.device.type == content::MEDIA_TAB_AUDIO_CAPTURE) {
- int sample_rate = media::GetAudioHardwareSampleRate();
+ const media::AudioParameters parameters =
+ audio_manager_->GetDefaultOutputStreamParameters();
+ int sample_rate = parameters.sample_rate();
// If we weren't able to get the native sampling rate, it most likely
// means the system did not have an output device, but for mirroring we
// still want to startup the audio engine, so set reasonable defaults.

Powered by Google App Engine
This is Rietveld 408576698