| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // ideally must not be called from the UI thread or other time sensitive | 57 // ideally must not be called from the UI thread or other time sensitive |
| 58 // threads to avoid blocking the rest of the application. | 58 // threads to avoid blocking the rest of the application. |
| 59 virtual void ShowAudioInputSettings() = 0; | 59 virtual void ShowAudioInputSettings() = 0; |
| 60 | 60 |
| 61 // Appends a list of available input devices to |device_names|, | 61 // Appends a list of available input devices to |device_names|, |
| 62 // which must initially be empty. It is not guaranteed that all the | 62 // which must initially be empty. It is not guaranteed that all the |
| 63 // devices in the list support all formats and sample rates for | 63 // devices in the list support all formats and sample rates for |
| 64 // recording. | 64 // recording. |
| 65 virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0; | 65 virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0; |
| 66 | 66 |
| 67 // Appends a list of available output devices to |device_names|, |
| 68 // which must initially be empty. |
| 69 virtual void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) = 0; |
| 70 |
| 67 // Factory for all the supported stream formats. |params| defines parameters | 71 // Factory for all the supported stream formats. |params| defines parameters |
| 68 // of the audio stream to be created. | 72 // of the audio stream to be created. |
| 69 // | 73 // |
| 70 // |params.sample_per_packet| is the requested buffer allocation which the | 74 // |params.sample_per_packet| is the requested buffer allocation which the |
| 71 // audio source thinks it can usually fill without blocking. Internally two | 75 // audio source thinks it can usually fill without blocking. Internally two |
| 72 // or three buffers are created, one will be locked for playback and one will | 76 // or three buffers are created, one will be locked for playback and one will |
| 73 // be ready to be filled in the call to AudioSourceCallback::OnMoreData(). | 77 // be ready to be filled in the call to AudioSourceCallback::OnMoreData(). |
| 74 // | 78 // |
| 75 // Returns NULL if the combination of the parameters is not supported, or if | 79 // Returns NULL if the combination of the parameters is not supported, or if |
| 76 // we have reached some other platform specific limit. | 80 // we have reached some other platform specific limit. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 protected: | 146 protected: |
| 143 AudioManager(); | 147 AudioManager(); |
| 144 | 148 |
| 145 private: | 149 private: |
| 146 DISALLOW_COPY_AND_ASSIGN(AudioManager); | 150 DISALLOW_COPY_AND_ASSIGN(AudioManager); |
| 147 }; | 151 }; |
| 148 | 152 |
| 149 } // namespace media | 153 } // namespace media |
| 150 | 154 |
| 151 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ | 155 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ |
| OLD | NEW |