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

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

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/audio_input_device_manager.cc
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 14bd4706fc38d73025068bc3162226fe0e5967d1..44f7f38bc52918f08bcc89371d80f7cebaf0efb0 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -12,7 +12,7 @@
#include "media/audio/audio_device_name.h"
#include "media/audio/audio_input_ipc.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"
namespace content {
@@ -158,15 +158,13 @@ void AudioInputDeviceManager::EnumerateOnDeviceThread(
it != device_names.end(); ++it) {
// Get the preferred sample rate and channel configuration for the
// current audio device.
- int sample_rate =
- media::GetAudioInputHardwareSampleRate(it->unique_id);
- media::ChannelLayout channel_layout =
- media::GetAudioInputHardwareChannelLayout(it->unique_id);
+ media::AudioParameters default_params =
+ audio_manager_->GetDefaultInputStreamParameters(it->unique_id);
// Add device information to device vector.
devices->push_back(StreamDeviceInfo(
- stream_type, it->device_name, it->unique_id, sample_rate,
- channel_layout, false));
+ stream_type, it->device_name, it->unique_id,
+ default_params.sample_rate(), default_params.channel_layout(), false));
}
// Return the device list through the listener by posting a task on

Powered by Google App Engine
This is Rietveld 408576698