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

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

Issue 23296008: Adding audio unit tests for Android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Feedback from tommi@ 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 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 "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/gtest_prod_util.h"
9 #include "media/audio/audio_manager_base.h" 10 #include "media/audio/audio_manager_base.h"
10 11
11 namespace media { 12 namespace media {
12 13
13 // Android implemention of AudioManager. 14 // Android implemention of AudioManager.
14 class MEDIA_EXPORT AudioManagerAndroid : public AudioManagerBase { 15 class MEDIA_EXPORT AudioManagerAndroid : public AudioManagerBase {
15 public: 16 public:
16 AudioManagerAndroid(); 17 AudioManagerAndroid();
17 18
18 // Implementation of AudioManager. 19 // Implementation of AudioManager.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 53
53 private: 54 private:
54 void SetAudioMode(int mode); 55 void SetAudioMode(int mode);
55 void RegisterHeadsetReceiver(); 56 void RegisterHeadsetReceiver();
56 void UnregisterHeadsetReceiver(); 57 void UnregisterHeadsetReceiver();
57 int GetNativeOutputSampleRate(); 58 int GetNativeOutputSampleRate();
58 bool IsAudioLowLatencySupported(); 59 bool IsAudioLowLatencySupported();
59 int GetAudioLowLatencyOutputFrameSize(); 60 int GetAudioLowLatencyOutputFrameSize();
60 int GetOptimalOutputFrameSize(int sample_rate, int channels); 61 int GetOptimalOutputFrameSize(int sample_rate, int channels);
61 62
63 // Allow the AudioAndroidTest to access private methods.
64 FRIEND_TEST_ALL_PREFIXES(AudioAndroidTest, IsAudioLowLatencySupported);
65
62 // Java AudioManager instance. 66 // Java AudioManager instance.
63 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; 67 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_;
64 68
65 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); 69 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);
66 }; 70 };
67 71
68 } // namespace media 72 } // namespace media
69 73
70 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 74 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698