Index: media/audio/android/audio_manager_android.h |
diff --git a/media/audio/android/audio_manager_android.h b/media/audio/android/audio_manager_android.h |
index cb904166f980f9bfb9eab0a966d8f71cada7e397..5650607ca93fc58db1244f81267a5e85f8dc9fde 100644 |
--- a/media/audio/android/audio_manager_android.h |
+++ b/media/audio/android/audio_manager_android.h |
@@ -5,12 +5,17 @@ |
#ifndef MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ |
#define MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ |
+#include <set> |
+ |
#include "base/android/jni_android.h" |
#include "base/gtest_prod_util.h" |
+#include "base/synchronization/lock.h" |
#include "media/audio/audio_manager_base.h" |
namespace media { |
+class OpenSLESOutputStream; |
+ |
// Android implemention of AudioManager. |
class MEDIA_EXPORT AudioManagerAndroid : public AudioManagerBase { |
public: |
@@ -52,6 +57,8 @@ class MEDIA_EXPORT AudioManagerAndroid : public AudioManagerBase { |
static bool RegisterAudioManager(JNIEnv* env); |
+ void SetMute(JNIEnv* env, jobject obj, jboolean muted); |
+ |
protected: |
virtual ~AudioManagerAndroid(); |
@@ -69,12 +76,21 @@ class MEDIA_EXPORT AudioManagerAndroid : public AudioManagerBase { |
int GetAudioLowLatencyOutputFrameSize(); |
int GetOptimalOutputFrameSize(int sample_rate, int channels); |
+ void DoSetMuteOnAudioThread(bool muted); |
+ |
// Allow the AudioAndroidTest to access private methods. |
FRIEND_TEST_ALL_PREFIXES(AudioAndroidTest, IsAudioLowLatencySupported); |
// Java AudioManager instance. |
base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; |
+ typedef std::set<OpenSLESOutputStream*> OutputStreams; |
+ OutputStreams streams_; |
+ // TODO(wjia): remove this lock once unit test modules are fixed to call |
+ // AudioManager::MakeAudioOutputStream on the audio thread. For now, this |
+ // lock is used to guard access to |streams_|. |
+ base::Lock streams_lock_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); |
}; |