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

Side by Side Diff: media/audio/audio_manager_base.h

Issue 14049003: Set default sampling rate to 44100 and query the native output sampling rate. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 8 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_AUDIO_MANAGER_BASE_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // will decide if they should return the values from |input_params| or the 129 // will decide if they should return the values from |input_params| or the
130 // default hardware values. If the |input_params| is invalid, it will return 130 // default hardware values. If the |input_params| is invalid, it will return
131 // the default hardware audio parameters. 131 // the default hardware audio parameters.
132 virtual AudioParameters GetPreferredOutputStreamParameters( 132 virtual AudioParameters GetPreferredOutputStreamParameters(
133 const AudioParameters& input_params) = 0; 133 const AudioParameters& input_params) = 0;
134 134
135 // Map of cached AudioOutputDispatcher instances. Must only be touched 135 // Map of cached AudioOutputDispatcher instances. Must only be touched
136 // from the audio thread (no locking). 136 // from the audio thread (no locking).
137 AudioOutputDispatchersMap output_dispatchers_; 137 AudioOutputDispatchersMap output_dispatchers_;
138 138
139 #if defined(OS_ANDROID)
140 int GetNativeOutputSampleRatee();
141 #endif
142
139 private: 143 private:
140 // Called by Shutdown(). 144 // Called by Shutdown().
141 void ShutdownOnAudioThread(); 145 void ShutdownOnAudioThread();
142 146
143 #if defined(OS_ANDROID) 147 #if defined(OS_ANDROID)
144 void SetAudioMode(int mode); 148 void SetAudioMode(int mode);
145 void RegisterHeadsetReceiver(); 149 void RegisterHeadsetReceiver();
146 void UnregisterHeadsetReceiver(); 150 void UnregisterHeadsetReceiver();
147 #endif 151 #endif
148 152
(...skipping 30 matching lines...) Expand all
179 // Java AudioManager instance. 183 // Java AudioManager instance.
180 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; 184 base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_;
181 #endif 185 #endif
182 186
183 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 187 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
184 }; 188 };
185 189
186 } // namespace media 190 } // namespace media
187 191
188 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 192 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698