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

Unified Diff: media/audio/pulse/audio_manager_pulse.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_manager_mac.cc ('k') | media/audio/pulse/pulse_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/audio_manager_pulse.cc
diff --git a/media/audio/pulse/audio_manager_pulse.cc b/media/audio/pulse/audio_manager_pulse.cc
index 6d33165b7682b4518a1937ee009431856bee8e42..4ec100e26f3ec07fc4fd8bac437834c70e9b9b12 100644
--- a/media/audio/pulse/audio_manager_pulse.cc
+++ b/media/audio/pulse/audio_manager_pulse.cc
@@ -13,6 +13,7 @@
#if defined(USE_ALSA)
#include "media/audio/alsa/audio_manager_alsa.h"
#endif
+#include "media/audio/audio_device_description.h"
#include "media/audio/pulse/pulse_input.h"
#include "media/audio/pulse/pulse_output.h"
#include "media/audio/pulse/pulse_util.h"
@@ -114,11 +115,8 @@ void AudioManagerPulse::GetAudioDeviceNames(
WaitForOperationCompletion(input_mainloop_, operation);
// Prepend the default device if the list is not empty.
- if (!device_names->empty()) {
- device_names->push_front(
- AudioDeviceName(AudioManager::GetDefaultDeviceName(),
- AudioManagerBase::kDefaultDeviceId));
- }
+ if (!device_names->empty())
+ device_names->push_front(AudioDeviceName::CreateDefault());
}
void AudioManagerPulse::GetAudioInputDeviceNames(
@@ -146,16 +144,16 @@ AudioParameters AudioManagerPulse::GetInputStreamParameters(
AudioOutputStream* AudioManagerPulse::MakeLinearOutputStream(
const AudioParameters& params) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
- return MakeOutputStream(params, AudioManagerBase::kDefaultDeviceId);
+ return MakeOutputStream(params, AudioDeviceDescription::kDefaultDeviceId);
}
AudioOutputStream* AudioManagerPulse::MakeLowLatencyOutputStream(
const AudioParameters& params,
const std::string& device_id) {
DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
- return MakeOutputStream(
- params,
- device_id.empty() ? AudioManagerBase::kDefaultDeviceId : device_id);
+ return MakeOutputStream(params, device_id.empty()
+ ? AudioDeviceDescription::kDefaultDeviceId
+ : device_id);
}
AudioInputStream* AudioManagerPulse::MakeLinearInputStream(
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | media/audio/pulse/pulse_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698