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

Unified Diff: media/audio/mac/audio_manager_mac.cc

Issue 1892433002: Moving device description utils from AudioManager[Base] into AudioDeviceDescription; to be shared b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 4 years, 8 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 | « media/audio/mac/audio_low_latency_input_mac_unittest.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index b0744eeaa1f10bbb1f87443686f18bd2a61e02f0..213ca2cf2f64b09756d797c50eef73a6cc423bc0 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -16,6 +16,7 @@
#include "base/power_monitor/power_observer.h"
#include "base/strings/sys_string_conversions.h"
#include "base/threading/thread_checker.h"
+#include "media/audio/audio_device_description.h"
#include "media/audio/mac/audio_auhal_mac.h"
#include "media/audio/mac/audio_input_mac.h"
#include "media/audio/mac/audio_low_latency_input_mac.h"
@@ -209,10 +210,7 @@ static void GetAudioDeviceInfo(bool is_input,
// Prepend the default device to the list since we always want it to be
// on the top of the list for all platforms. There is no duplicate
// counting here since the default device has been abstracted out before.
- media::AudioDeviceName name;
- name.device_name = AudioManager::GetDefaultDeviceName();
- name.unique_id = AudioManagerBase::kDefaultDeviceId;
- device_names->push_front(name);
+ device_names->push_front(media::AudioDeviceName::CreateDefault());
}
}
@@ -228,7 +226,7 @@ static AudioDeviceID GetAudioDeviceIdByUId(bool is_input,
UInt32 device_size = sizeof(audio_device_id);
OSStatus result = -1;
- if (device_id == AudioManagerBase::kDefaultDeviceId || device_id.empty()) {
+ if (AudioDeviceDescription::IsDefaultDevice(device_id)) {
// Default Device.
property_address.mSelector = is_input ?
kAudioHardwarePropertyDefaultInputDevice :
@@ -630,7 +628,7 @@ AudioOutputStream* AudioManagerMac::MakeLowLatencyOutputStream(
// listener.
if (device_listener_first_init) {
// Only set the current output device for the default device.
- if (device_id == AudioManagerBase::kDefaultDeviceId || device_id.empty())
+ if (AudioDeviceDescription::IsDefaultDevice(device_id))
current_output_device_ = device;
// Just use the current sample rate since we don't allow non-native sample
// rates on OSX.
« no previous file with comments | « media/audio/mac/audio_low_latency_input_mac_unittest.cc ('k') | media/audio/pulse/audio_manager_pulse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698