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

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

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged GetPreferredLowLatencyOutputStreamParameters to GetDefaultOutputStreamParameters Created 7 years, 9 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 | 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_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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Creates the input stream for the |AUDIO_PCM_LINEAR| format. The legacy 77 // Creates the input stream for the |AUDIO_PCM_LINEAR| format. The legacy
78 // name is also from |AUDIO_PCM_LINEAR|. 78 // name is also from |AUDIO_PCM_LINEAR|.
79 virtual AudioInputStream* MakeLinearInputStream( 79 virtual AudioInputStream* MakeLinearInputStream(
80 const AudioParameters& params, const std::string& device_id) = 0; 80 const AudioParameters& params, const std::string& device_id) = 0;
81 81
82 // Creates the input stream for the |AUDIO_PCM_LOW_LATENCY| format. 82 // Creates the input stream for the |AUDIO_PCM_LOW_LATENCY| format.
83 virtual AudioInputStream* MakeLowLatencyInputStream( 83 virtual AudioInputStream* MakeLowLatencyInputStream(
84 const AudioParameters& params, const std::string& device_id) = 0; 84 const AudioParameters& params, const std::string& device_id) = 0;
85 85
86 // Returns the preferred hardware audio output parameters for opening output
87 // streams in the |AUDIO_PCM_LOW_LATENCY| format.
88 // TODO(dalecurtis): Retrieve the |channel_layout| value from hardware instead
89 // of accepting the value.
90 // TODO(dalecurtis): Each AudioManager should implement their own version, see
91 // http://crbug.com/137326
92 virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters(
93 const AudioParameters& input_params);
94
95 // Listeners will be notified on the AudioManager::GetMessageLoop() loop. 86 // Listeners will be notified on the AudioManager::GetMessageLoop() loop.
96 virtual void AddOutputDeviceChangeListener( 87 virtual void AddOutputDeviceChangeListener(
97 AudioDeviceListener* listener) OVERRIDE; 88 AudioDeviceListener* listener) OVERRIDE;
98 virtual void RemoveOutputDeviceChangeListener( 89 virtual void RemoveOutputDeviceChangeListener(
99 AudioDeviceListener* listener) OVERRIDE; 90 AudioDeviceListener* listener) OVERRIDE;
100 91
101 protected: 92 protected:
102 AudioManagerBase(); 93 AudioManagerBase();
103 94
104 // TODO(dalecurtis): This must change to map both input and output parameters 95 // TODO(dalecurtis): This must change to map both input and output parameters
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // tasks which run on the audio thread even after Shutdown() has been started 148 // tasks which run on the audio thread even after Shutdown() has been started
158 // and GetMessageLoop() starts returning NULL. 149 // and GetMessageLoop() starts returning NULL.
159 scoped_refptr<base::MessageLoopProxy> message_loop_; 150 scoped_refptr<base::MessageLoopProxy> message_loop_;
160 151
161 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 152 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
162 }; 153 };
163 154
164 } // namespace media 155 } // namespace media
165 156
166 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 157 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698