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 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 public: | 294 public: |
295 typedef AudioOutputStream StreamType; | 295 typedef AudioOutputStream StreamType; |
296 | 296 |
297 static AudioParameters GetDefaultAudioStreamParameters( | 297 static AudioParameters GetDefaultAudioStreamParameters( |
298 AudioManager* audio_manager) { | 298 AudioManager* audio_manager) { |
299 return audio_manager->GetDefaultOutputStreamParameters(); | 299 return audio_manager->GetDefaultOutputStreamParameters(); |
300 } | 300 } |
301 | 301 |
302 static StreamType* CreateStream(AudioManager* audio_manager, | 302 static StreamType* CreateStream(AudioManager* audio_manager, |
303 const AudioParameters& params) { | 303 const AudioParameters& params) { |
304 return audio_manager->MakeAudioOutputStream(params, std::string()); | 304 return audio_manager->MakeAudioOutputStream( |
| 305 params, std::string(), AudioManager::StatisticsCallback()); |
305 } | 306 } |
306 }; | 307 }; |
307 | 308 |
308 // Traits template holding a trait of StreamType. It encapsulates | 309 // Traits template holding a trait of StreamType. It encapsulates |
309 // AudioInputStream and AudioOutputStream stream types. | 310 // AudioInputStream and AudioOutputStream stream types. |
310 template <typename StreamTraits> | 311 template <typename StreamTraits> |
311 class StreamWrapper { | 312 class StreamWrapper { |
312 public: | 313 public: |
313 typedef typename StreamTraits::StreamType StreamType; | 314 typedef typename StreamTraits::StreamType StreamType; |
314 | 315 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 435 |
435 // All Close() operations that run on the mocked audio thread, | 436 // All Close() operations that run on the mocked audio thread, |
436 // should be synchronous and not post additional close tasks to | 437 // should be synchronous and not post additional close tasks to |
437 // mocked the audio thread. Hence, there is no need to call | 438 // mocked the audio thread. Hence, there is no need to call |
438 // message_loop()->RunUntilIdle() after the Close() methods. | 439 // message_loop()->RunUntilIdle() after the Close() methods. |
439 aos->Close(); | 440 aos->Close(); |
440 ais->Close(); | 441 ais->Close(); |
441 } | 442 } |
442 | 443 |
443 } // namespace media | 444 } // namespace media |
OLD | NEW |