| 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_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 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual AudioInputStream* MakeLowLatencyInputStream( | 80 virtual AudioInputStream* MakeLowLatencyInputStream( |
| 81 const AudioParameters& params, const std::string& device_id) = 0; | 81 const AudioParameters& params, const std::string& device_id) = 0; |
| 82 | 82 |
| 83 // Returns the preferred hardware audio output parameters for opening output | 83 // Returns the preferred hardware audio output parameters for opening output |
| 84 // streams in the |AUDIO_PCM_LOW_LATENCY| format. | 84 // streams in the |AUDIO_PCM_LOW_LATENCY| format. |
| 85 // TODO(dalecurtis): Retrieve the |channel_layout| value from hardware instead | 85 // TODO(dalecurtis): Retrieve the |channel_layout| value from hardware instead |
| 86 // of accepting the value. | 86 // of accepting the value. |
| 87 // TODO(dalecurtis): Each AudioManager should implement their own version, see | 87 // TODO(dalecurtis): Each AudioManager should implement their own version, see |
| 88 // http://crbug.com/137326 | 88 // http://crbug.com/137326 |
| 89 virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters( | 89 virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters( |
| 90 ChannelLayout channel_layout); | 90 const AudioParameters& input_params); |
| 91 | 91 |
| 92 protected: | 92 protected: |
| 93 AudioManagerBase(); | 93 AudioManagerBase(); |
| 94 | 94 |
| 95 typedef std::map<AudioParameters, scoped_refptr<AudioOutputDispatcher>, | 95 typedef std::map<AudioParameters, scoped_refptr<AudioOutputDispatcher>, |
| 96 AudioParameters::Compare> | 96 AudioParameters::Compare> |
| 97 AudioOutputDispatchersMap; | 97 AudioOutputDispatchersMap; |
| 98 | 98 |
| 99 // Shuts down the audio thread and releases all the audio output dispatchers | 99 // Shuts down the audio thread and releases all the audio output dispatchers |
| 100 // on the audio thread. All audio streams should be freed before | 100 // on the audio thread. All audio streams should be freed before |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Number of currently open input streams. | 133 // Number of currently open input streams. |
| 134 int num_input_streams_; | 134 int num_input_streams_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 136 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace media | 139 } // namespace media |
| 140 | 140 |
| 141 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 141 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
| OLD | NEW |