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

Unified Diff: media/audio/audio_manager_base.cc

Issue 2563653002: Replace AudioManager::GetAudio*DeviceNames with AudioManager::GetAudio*DeviceDescriptions (Closed)
Patch Set: nit fixes Created 4 years 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 | « media/audio/audio_manager_base.h ('k') | media/audio/audio_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index a9d46a386d22670052d61e6390c7b1a875d7c443..f32fbfa4e4117d720be2f88f5a60c98a1cbfc606 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -102,6 +102,30 @@ base::string16 AudioManagerBase::GetAudioInputDeviceModel() {
return base::string16();
}
+void AudioManagerBase::GetAudioInputDeviceDescriptions(
+ AudioDeviceDescriptions* device_descriptions) {
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
+ AudioDeviceNames device_names;
+ GetAudioInputDeviceNames(&device_names);
+
+ for (const media::AudioDeviceName& name : device_names) {
+ device_descriptions->emplace_back(name.device_name, name.unique_id,
+ GetGroupIDInput(name.unique_id));
+ }
+}
+
+void AudioManagerBase::GetAudioOutputDeviceDescriptions(
+ AudioDeviceDescriptions* device_descriptions) {
+ CHECK(GetTaskRunner()->BelongsToCurrentThread());
+ AudioDeviceNames device_names;
+ GetAudioOutputDeviceNames(&device_names);
+
+ for (const media::AudioDeviceName& name : device_names) {
+ device_descriptions->emplace_back(name.device_name, name.unique_id,
+ GetGroupIDOutput(name.unique_id));
+ }
+}
+
AudioOutputStream* AudioManagerBase::MakeAudioOutputStream(
const AudioParameters& params,
const std::string& device_id,
@@ -395,6 +419,7 @@ std::string AudioManagerBase::GetDefaultOutputDeviceID() {
return "";
}
+// static
int AudioManagerBase::GetUserBufferSize() {
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
int buffer_size = 0;
« no previous file with comments | « media/audio/audio_manager_base.h ('k') | media/audio/audio_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698