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_OUTPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void Pause(); | 136 void Pause(); |
137 | 137 |
138 // Closes the audio output stream. The state is changed and the resources | 138 // Closes the audio output stream. The state is changed and the resources |
139 // are freed on the audio manager thread. |closed_task| is executed after | 139 // are freed on the audio manager thread. |closed_task| is executed after |
140 // that, on the thread on which Close was called. Callbacks (EventHandler and | 140 // that, on the thread on which Close was called. Callbacks (EventHandler and |
141 // SyncReader) must exist until closed_task is called, but they are safe | 141 // SyncReader) must exist until closed_task is called, but they are safe |
142 // to delete after that. | 142 // to delete after that. |
143 // | 143 // |
144 // It is safe to call this method more than once. Calls after the first one | 144 // It is safe to call this method more than once. Calls after the first one |
145 // will have no effect. | 145 // will have no effect. |
146 void Close(const base::Closure& closed_task); | 146 void Close(base::OnceClosure closed_task); |
147 | 147 |
148 // Sets the volume of the audio output stream. | 148 // Sets the volume of the audio output stream. |
149 void SetVolume(double volume); | 149 void SetVolume(double volume); |
150 | 150 |
151 // AudioSourceCallback implementation. | 151 // AudioSourceCallback implementation. |
152 int OnMoreData(base::TimeDelta delay, | 152 int OnMoreData(base::TimeDelta delay, |
153 base::TimeTicks delay_timestamp, | 153 base::TimeTicks delay_timestamp, |
154 int prior_frames_skipped, | 154 int prior_frames_skipped, |
155 AudioBus* dest) override; | 155 AudioBus* dest) override; |
156 void OnError(AudioOutputStream* stream) override; | 156 void OnError(AudioOutputStream* stream) override; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 // be accessed while |error_lock_| is held. | 266 // be accessed while |error_lock_| is held. |
267 bool ignore_errors_during_stop_close_; | 267 bool ignore_errors_during_stop_close_; |
268 base::Lock error_lock_; | 268 base::Lock error_lock_; |
269 | 269 |
270 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); | 270 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); |
271 }; | 271 }; |
272 | 272 |
273 } // namespace media | 273 } // namespace media |
274 | 274 |
275 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 275 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
OLD | NEW |