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

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

Issue 285233005: add audio-buffer-size command line flag support to the input audio for all the platforms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « media/audio/alsa/audio_manager_alsa.cc ('k') | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 8 #include <set>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 AudioManagerAndroid(AudioLogFactory* audio_log_factory); 23 AudioManagerAndroid(AudioLogFactory* audio_log_factory);
24 24
25 // Implementation of AudioManager. 25 // Implementation of AudioManager.
26 virtual bool HasAudioOutputDevices() OVERRIDE; 26 virtual bool HasAudioOutputDevices() OVERRIDE;
27 virtual bool HasAudioInputDevices() OVERRIDE; 27 virtual bool HasAudioInputDevices() OVERRIDE;
28 virtual void GetAudioInputDeviceNames( 28 virtual void GetAudioInputDeviceNames(
29 AudioDeviceNames* device_names) OVERRIDE; 29 AudioDeviceNames* device_names) OVERRIDE;
30 virtual void GetAudioOutputDeviceNames( 30 virtual void GetAudioOutputDeviceNames(
31 AudioDeviceNames* device_names) OVERRIDE; 31 AudioDeviceNames* device_names) OVERRIDE;
32 virtual AudioParameters GetInputStreamParameters(
33 const std::string& device_id) OVERRIDE;
34 32
35 virtual AudioOutputStream* MakeAudioOutputStream( 33 virtual AudioOutputStream* MakeAudioOutputStream(
36 const AudioParameters& params, 34 const AudioParameters& params,
37 const std::string& device_id) OVERRIDE; 35 const std::string& device_id) OVERRIDE;
38 virtual AudioInputStream* MakeAudioInputStream( 36 virtual AudioInputStream* MakeAudioInputStream(
39 const AudioParameters& params, 37 const AudioParameters& params,
40 const std::string& device_id) OVERRIDE; 38 const std::string& device_id) OVERRIDE;
41 virtual void ReleaseOutputStream(AudioOutputStream* stream) OVERRIDE; 39 virtual void ReleaseOutputStream(AudioOutputStream* stream) OVERRIDE;
42 virtual void ReleaseInputStream(AudioInputStream* stream) OVERRIDE; 40 virtual void ReleaseInputStream(AudioInputStream* stream) OVERRIDE;
43 41
(...skipping 13 matching lines...) Expand all
57 static bool RegisterAudioManager(JNIEnv* env); 55 static bool RegisterAudioManager(JNIEnv* env);
58 56
59 void SetMute(JNIEnv* env, jobject obj, jboolean muted); 57 void SetMute(JNIEnv* env, jobject obj, jboolean muted);
60 58
61 protected: 59 protected:
62 virtual ~AudioManagerAndroid(); 60 virtual ~AudioManagerAndroid();
63 61
64 virtual AudioParameters GetPreferredOutputStreamParameters( 62 virtual AudioParameters GetPreferredOutputStreamParameters(
65 const std::string& output_device_id, 63 const std::string& output_device_id,
66 const AudioParameters& input_params) OVERRIDE; 64 const AudioParameters& input_params) OVERRIDE;
65 virtual AudioParameters GetPreferredInputStreamParameters(
66 const std::string& input_device_id,
67 const AudioParameters& input_params) OVERRIDE;
67 68
68 private: 69 private:
69 void InitializeOnAudioThread(); 70 void InitializeOnAudioThread();
70 void ShutdownOnAudioThread(); 71 void ShutdownOnAudioThread();
71 72
72 bool HasNoAudioInputStreams(); 73 bool HasNoAudioInputStreams();
73 void SetCommunicationAudioModeOn(bool on); 74 void SetCommunicationAudioModeOn(bool on);
74 bool SetAudioDevice(const std::string& device_id); 75 bool SetAudioDevice(const std::string& device_id);
75 int GetNativeOutputSampleRate(); 76 int GetNativeOutputSampleRate();
76 bool IsAudioLowLatencySupported(); 77 bool IsAudioLowLatencySupported();
(...skipping 11 matching lines...) Expand all
88 // Enabled when first input stream is created and set to false when last 89 // Enabled when first input stream is created and set to false when last
89 // input stream is destroyed. Also affects the stream type of output streams. 90 // input stream is destroyed. Also affects the stream type of output streams.
90 bool communication_mode_is_on_; 91 bool communication_mode_is_on_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid); 93 DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);
93 }; 94 };
94 95
95 } // namespace media 96 } // namespace media
96 97
97 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_ 98 #endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
OLDNEW
« no previous file with comments | « media/audio/alsa/audio_manager_alsa.cc ('k') | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698