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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Audio worker thread (see GetWorkerTaskRunner()). | 107 // Audio worker thread (see GetWorkerTaskRunner()). |
108 virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0; | 108 virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0; |
109 | 109 |
110 // Appends a list of available output devices to |device_names|, | 110 // Appends a list of available output devices to |device_names|, |
111 // which must initially be empty. | 111 // which must initially be empty. |
112 // | 112 // |
113 // Not threadsafe; in production this should only be called from the | 113 // Not threadsafe; in production this should only be called from the |
114 // Audio worker thread (see GetWorkerTaskRunner()). | 114 // Audio worker thread (see GetWorkerTaskRunner()). |
115 virtual void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) = 0; | 115 virtual void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) = 0; |
116 | 116 |
| 117 // Returns the localized name of the generic "default" device. |
| 118 virtual std::string GetDefaultDeviceName() const = 0; |
| 119 |
| 120 // Returns the localized name of the generic default communications device. |
| 121 // This device is not supported on all platforms. |
| 122 virtual std::string GetCommunicationsDeviceName() const = 0; |
| 123 |
117 // Factory for all the supported stream formats. |params| defines parameters | 124 // Factory for all the supported stream formats. |params| defines parameters |
118 // of the audio stream to be created. | 125 // of the audio stream to be created. |
119 // | 126 // |
120 // |params.sample_per_packet| is the requested buffer allocation which the | 127 // |params.sample_per_packet| is the requested buffer allocation which the |
121 // audio source thinks it can usually fill without blocking. Internally two | 128 // audio source thinks it can usually fill without blocking. Internally two |
122 // or three buffers are created, one will be locked for playback and one will | 129 // or three buffers are created, one will be locked for playback and one will |
123 // be ready to be filled in the call to AudioSourceCallback::OnMoreData(). | 130 // be ready to be filled in the call to AudioSourceCallback::OnMoreData(). |
124 // | 131 // |
125 // To create a stream for the default output device, pass an empty string | 132 // To create a stream for the default output device, pass an empty string |
126 // for |device_id|, otherwise the specified audio device will be opened. | 133 // for |device_id|, otherwise the specified audio device will be opened. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 protected: | 230 protected: |
224 AudioManager(); | 231 AudioManager(); |
225 | 232 |
226 private: | 233 private: |
227 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 234 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
228 }; | 235 }; |
229 | 236 |
230 } // namespace media | 237 } // namespace media |
231 | 238 |
232 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 239 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
OLD | NEW |