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

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

Issue 78033003: Adding device enumeration to Android device manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 years 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 | Annotate | Revision Log
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 "base/gtest_prod_util.h"
10 #include "media/audio/audio_manager_base.h" 10 #include "media/audio/audio_manager_base.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static bool RegisterAudioManager(JNIEnv* env); 53 static bool RegisterAudioManager(JNIEnv* env);
54 54
55 protected: 55 protected:
56 virtual ~AudioManagerAndroid(); 56 virtual ~AudioManagerAndroid();
57 57
58 virtual AudioParameters GetPreferredOutputStreamParameters( 58 virtual AudioParameters GetPreferredOutputStreamParameters(
59 const std::string& output_device_id, 59 const std::string& output_device_id,
60 const AudioParameters& input_params) OVERRIDE; 60 const AudioParameters& input_params) OVERRIDE;
61 61
62 private: 62 private:
63 void Init();
64 void Close();
63 void SetAudioMode(int mode); 65 void SetAudioMode(int mode);
64 void RegisterHeadsetReceiver(); 66 void SetAudioDevice(const std::string& device_id);
65 void UnregisterHeadsetReceiver();
66 int GetNativeOutputSampleRate(); 67 int GetNativeOutputSampleRate();
67 bool IsAudioLowLatencySupported(); 68 bool IsAudioLowLatencySupported();
68 int GetAudioLowLatencyOutputFrameSize(); 69 int GetAudioLowLatencyOutputFrameSize();
69 int GetOptimalOutputFrameSize(int sample_rate, int channels); 70 int GetOptimalOutputFrameSize(int sample_rate, int channels);
70 71
71 // Allow the AudioAndroidTest to access private methods. 72 // Allow the AudioAndroidTest to access private methods.
72 FRIEND_TEST_ALL_PREFIXES(AudioAndroidTest, IsAudioLowLatencySupported); 73 FRIEND_TEST_ALL_PREFIXES(AudioAndroidTest, IsAudioLowLatencySupported);
73 74
74 // Java AudioManager instance. 75 // Java AudioManager instance.
75 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; 76 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); 78 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);
78 }; 79 };
79 80
80 } // namespace media 81 } // namespace media
81 82
82 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 83 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/android/audio_manager_android.cc » ('j') | media/audio/android/audio_manager_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698