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

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

Issue 14430003: Using native sampling rate and optimal buffer size for audio on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 "media/audio/audio_manager_base.h" 9 #include "media/audio/audio_manager_base.h"
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 protected: 45 protected:
46 virtual ~AudioManagerAndroid(); 46 virtual ~AudioManagerAndroid();
47 47
48 virtual AudioParameters GetPreferredOutputStreamParameters( 48 virtual AudioParameters GetPreferredOutputStreamParameters(
49 const AudioParameters& input_params) OVERRIDE; 49 const AudioParameters& input_params) OVERRIDE;
50 50
51 private: 51 private:
52 void SetAudioMode(int mode); 52 void SetAudioMode(int mode);
53 void RegisterHeadsetReceiver(); 53 void RegisterHeadsetReceiver();
54 void UnregisterHeadsetReceiver(); 54 void UnregisterHeadsetReceiver();
55 int GetNativeOutputSampleRate();
56 int GetMinInputBufferSize(int rate, int channels);
57 int GetMinOutputBufferSize(int rate, int channels);
58 bool IsAudioLowLatencySupported();
59 int GetAudioLowLatencyFrameSize();
60 int GetAudioOptimalOutputFrameSize(int sample_rate);
55 61
56 // Java AudioManager instance. 62 // Java AudioManager instance.
57 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; 63 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_;
58 64
59 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); 65 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);
60 }; 66 };
61 67
62 } // namespace media 68 } // namespace media
63 69
64 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 70 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698