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

Unified Diff: media/audio/android/audio_manager_android.cc

Issue 23475026: Implement GetAudioOutputDeviceNames for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 7 years, 3 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/android/audio_manager_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/android/audio_manager_android.cc
diff --git a/media/audio/android/audio_manager_android.cc b/media/audio/android/audio_manager_android.cc
index e6eed7fea48ef2d83b815e88f495e8c497b49160..3161a48e7e2d2a5cb49fbd72e1b1d5f09f2710b0 100644
--- a/media/audio/android/audio_manager_android.cc
+++ b/media/audio/android/audio_manager_android.cc
@@ -16,6 +16,16 @@
namespace media {
+namespace {
+
+void AddDefaultDevice(AudioDeviceNames* device_names) {
+ DCHECK(device_names->empty());
+ device_names->push_front(
+ AudioDeviceName(kDefaultDeviceName, kDefaultDeviceId));
+}
+
+} // namespace
+
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 10;
@@ -51,10 +61,13 @@ bool AudioManagerAndroid::HasAudioInputDevices() {
}
void AudioManagerAndroid::GetAudioInputDeviceNames(
- media::AudioDeviceNames* device_names) {
- DCHECK(device_names->empty());
- device_names->push_front(
- media::AudioDeviceName(kDefaultDeviceName, kDefaultDeviceId));
+ AudioDeviceNames* device_names) {
+ AddDefaultDevice(device_names);
+}
+
+void AudioManagerAndroid::GetAudioOutputDeviceNames(
+ AudioDeviceNames* device_names) {
+ AddDefaultDevice(device_names);
}
AudioParameters AudioManagerAndroid::GetInputStreamParameters(
@@ -90,7 +103,7 @@ AudioOutputStream* AudioManagerAndroid::MakeAudioOutputStream(
AudioInputStream* AudioManagerAndroid::MakeAudioInputStream(
const AudioParameters& params, const std::string& device_id) {
AudioInputStream* stream =
- AudioManagerBase::MakeAudioInputStream(params, device_id);
+ AudioManagerBase::MakeAudioInputStream(params, device_id);
return stream;
}
« no previous file with comments | « media/audio/android/audio_manager_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698