| OLD | NEW |
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void SetMute(JNIEnv* env, | 72 void SetMute(JNIEnv* env, |
| 73 const base::android::JavaParamRef<jobject>& obj, | 73 const base::android::JavaParamRef<jobject>& obj, |
| 74 jboolean muted); | 74 jboolean muted); |
| 75 | 75 |
| 76 // Sets a volume that applies to all this manager's output audio streams. | 76 // Sets a volume that applies to all this manager's output audio streams. |
| 77 // This overrides other SetVolume calls (e.g. through AudioHostMsg_SetVolume). | 77 // This overrides other SetVolume calls (e.g. through AudioHostMsg_SetVolume). |
| 78 void SetOutputVolumeOverride(double volume); | 78 void SetOutputVolumeOverride(double volume); |
| 79 bool HasOutputVolumeOverride(double* out_volume) const; | 79 bool HasOutputVolumeOverride(double* out_volume) const; |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 void ShutdownOnAudioThread() override; | 82 void ShutdownOnAudioThread(bool immediately) override; |
| 83 AudioParameters GetPreferredOutputStreamParameters( | 83 AudioParameters GetPreferredOutputStreamParameters( |
| 84 const std::string& output_device_id, | 84 const std::string& output_device_id, |
| 85 const AudioParameters& input_params) override; | 85 const AudioParameters& input_params) override; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 jobject GetJavaAudioManager(); | 88 jobject GetJavaAudioManager(); |
| 89 bool HasNoAudioInputStreams(); | 89 bool HasNoAudioInputStreams(); |
| 90 void SetCommunicationAudioModeOn(bool on); | 90 void SetCommunicationAudioModeOn(bool on); |
| 91 bool SetAudioDevice(const std::string& device_id); | 91 bool SetAudioDevice(const std::string& device_id); |
| 92 int GetNativeOutputSampleRate(); | 92 int GetNativeOutputSampleRate(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 110 // If set, overrides volume level on output streams | 110 // If set, overrides volume level on output streams |
| 111 bool output_volume_override_set_; | 111 bool output_volume_override_set_; |
| 112 double output_volume_override_; | 112 double output_volume_override_; |
| 113 | 113 |
| 114 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); | 114 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace media | 117 } // namespace media |
| 118 | 118 |
| 119 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ | 119 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ |
| OLD | NEW |