OLD | NEW |
---|---|
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 // callback is to recreate the stream. | 113 // callback is to recreate the stream. |
114 class AudioDeviceListener { | 114 class AudioDeviceListener { |
115 public: | 115 public: |
116 virtual void OnDeviceChange() = 0; | 116 virtual void OnDeviceChange() = 0; |
117 }; | 117 }; |
118 | 118 |
119 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; | 119 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; |
120 virtual void RemoveOutputDeviceChangeListener( | 120 virtual void RemoveOutputDeviceChangeListener( |
121 AudioDeviceListener* listener) = 0; | 121 AudioDeviceListener* listener) = 0; |
122 | 122 |
123 // Returns the default output hardware audio parameters for opening output | |
124 // streams. If the users inject a valid |input_params|, each AudioManager | |
125 // will decide if they should return the values from |input_params| or the | |
126 // default hardware values. If the |input_params| is invalid, it will simply | |
127 // return the default hardware audio parameters. | |
128 virtual AudioParameters GetDefaultOutputStreamParameters( | |
Chris Rogers
2013/03/04 01:04:11
It would be good to have another version of this m
no longer working on chromium
2013/03/04 14:55:04
I agree that is a bit clunky to force the clients
| |
129 const AudioParameters& input_params) = 0; | |
130 | |
131 // Returns the input hardware audio parameters of the specific device | |
132 // for opening input streams. | |
133 virtual AudioParameters GetInputStreamParameters( | |
134 const std::string& device_id) = 0; | |
135 | |
123 protected: | 136 protected: |
124 AudioManager(); | 137 AudioManager(); |
125 | 138 |
126 private: | 139 private: |
127 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 140 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
128 }; | 141 }; |
129 | 142 |
130 } // namespace media | 143 } // namespace media |
131 | 144 |
132 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 145 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |