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

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: 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..60e9be55a0734bec9bbd5b5e7c3515f26e8b19b9 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_->GetInputStreamParameters(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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698