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

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

Issue 23523023: Add GetOutputStreamParameters, GetAssociatedOutputDeviceID to AudioManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; 138 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0;
139 virtual void RemoveOutputDeviceChangeListener( 139 virtual void RemoveOutputDeviceChangeListener(
140 AudioDeviceListener* listener) = 0; 140 AudioDeviceListener* listener) = 0;
141 141
142 // Returns the default output hardware audio parameters for opening output 142 // Returns the default output hardware audio parameters for opening output
143 // streams. It is a convenience interface to 143 // streams. It is a convenience interface to
144 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager 144 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager
145 // does not need their own implementation to this interface. 145 // does not need their own implementation to this interface.
146 virtual AudioParameters GetDefaultOutputStreamParameters() = 0; 146 virtual AudioParameters GetDefaultOutputStreamParameters() = 0;
147 147
148 // Returns the output hardware audio parameters for a specific output device.
henrika (OOO until Aug 14) 2013/09/04 11:11:40 Did you consider using only this method and use a
tommi (sloooow) - chröme 2013/09/04 13:06:55 Yes, that's the goal but I decided not to remove t
149 virtual AudioParameters GetOutputStreamParameters(
150 const std::string& device_id) = 0;
151
148 // Returns the input hardware audio parameters of the specific device 152 // Returns the input hardware audio parameters of the specific device
149 // for opening input streams. Each AudioManager needs to implement their own 153 // for opening input streams. Each AudioManager needs to implement their own
150 // version of this interface. 154 // version of this interface.
151 virtual AudioParameters GetInputStreamParameters( 155 virtual AudioParameters GetInputStreamParameters(
152 const std::string& device_id) = 0; 156 const std::string& device_id) = 0;
153 157
158 // Returns the device id of an output device that belongs to the same hardware
159 // as the specified input device.
160 // If the hardware has only an input device (e.g. a webcam), the return value
161 // will be empty (which the caller can then interpret to be the default output
162 // device). Implementations that don't yet support this feature, must return
163 // an empty string.
164 virtual std::string GetAssociatedOutputDeviceID(
henrika (OOO until Aug 14) 2013/09/04 11:11:40 Like the name Associated.
165 const std::string& input_device_id) = 0;
166
154 protected: 167 protected:
155 AudioManager(); 168 AudioManager();
156 169
157 private: 170 private:
158 DISALLOW_COPY_AND_ASSIGN(AudioManager); 171 DISALLOW_COPY_AND_ASSIGN(AudioManager);
159 }; 172 };
160 173
161 } // namespace media 174 } // namespace media
162 175
163 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 176 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_manager_base.h » ('j') | media/audio/win/audio_low_latency_output_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698