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

Side by Side Diff: media/audio/android/audio_manager_android.h

Issue 1339183002: Add localized default audio device names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix descriptions. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 5 #ifndef MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
6 #define MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 6 #define MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void SetCommunicationAudioModeOn(bool on); 75 void SetCommunicationAudioModeOn(bool on);
76 bool SetAudioDevice(const std::string& device_id); 76 bool SetAudioDevice(const std::string& device_id);
77 int GetNativeOutputSampleRate(); 77 int GetNativeOutputSampleRate();
78 bool IsAudioLowLatencySupported(); 78 bool IsAudioLowLatencySupported();
79 int GetAudioLowLatencyOutputFrameSize(); 79 int GetAudioLowLatencyOutputFrameSize();
80 int GetOptimalOutputFrameSize(int sample_rate, int channels); 80 int GetOptimalOutputFrameSize(int sample_rate, int channels);
81 81
82 void DoSetMuteOnAudioThread(bool muted); 82 void DoSetMuteOnAudioThread(bool muted);
83 void DoSetVolumeOnAudioThread(double volume); 83 void DoSetVolumeOnAudioThread(double volume);
84 84
85 void AddDefaultDevice(AudioDeviceNames* device_names) const;
86
85 // Java AudioManager instance. 87 // Java AudioManager instance.
86 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; 88 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_;
87 89
88 typedef std::set<OpenSLESOutputStream*> OutputStreams; 90 typedef std::set<OpenSLESOutputStream*> OutputStreams;
89 OutputStreams streams_; 91 OutputStreams streams_;
90 92
91 // Enabled when first input stream is created and set to false when last 93 // Enabled when first input stream is created and set to false when last
92 // input stream is destroyed. Also affects the stream type of output streams. 94 // input stream is destroyed. Also affects the stream type of output streams.
93 bool communication_mode_is_on_; 95 bool communication_mode_is_on_;
94 96
95 // If set, overrides volume level on output streams 97 // If set, overrides volume level on output streams
96 bool output_volume_override_set_; 98 bool output_volume_override_set_;
97 double output_volume_override_; 99 double output_volume_override_;
98 100
99 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); 101 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);
100 }; 102 };
101 103
102 } // namespace media 104 } // namespace media
103 105
104 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 106 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698