| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 public: | 302 public: |
| 303 typedef AudioOutputStream StreamType; | 303 typedef AudioOutputStream StreamType; |
| 304 | 304 |
| 305 static AudioParameters GetDefaultAudioStreamParameters( | 305 static AudioParameters GetDefaultAudioStreamParameters( |
| 306 AudioManager* audio_manager) { | 306 AudioManager* audio_manager) { |
| 307 return audio_manager->GetDefaultOutputStreamParameters(); | 307 return audio_manager->GetDefaultOutputStreamParameters(); |
| 308 } | 308 } |
| 309 | 309 |
| 310 static StreamType* CreateStream(AudioManager* audio_manager, | 310 static StreamType* CreateStream(AudioManager* audio_manager, |
| 311 const AudioParameters& params) { | 311 const AudioParameters& params) { |
| 312 return audio_manager->MakeAudioOutputStream(params); | 312 return audio_manager->MakeAudioOutputStream(params, std::string()); |
| 313 } | 313 } |
| 314 }; | 314 }; |
| 315 | 315 |
| 316 // Traits template holding a trait of StreamType. It encapsulates | 316 // Traits template holding a trait of StreamType. It encapsulates |
| 317 // AudioInputStream and AudioOutputStream stream types. | 317 // AudioInputStream and AudioOutputStream stream types. |
| 318 template <typename StreamTraits> | 318 template <typename StreamTraits> |
| 319 class StreamWrapper { | 319 class StreamWrapper { |
| 320 public: | 320 public: |
| 321 typedef typename StreamTraits::StreamType StreamType; | 321 typedef typename StreamTraits::StreamType StreamType; |
| 322 | 322 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 441 |
| 442 // All Close() operations that run on the mocked audio thread, | 442 // All Close() operations that run on the mocked audio thread, |
| 443 // should be synchronous and not post additional close tasks to | 443 // should be synchronous and not post additional close tasks to |
| 444 // mocked the audio thread. Hence, there is no need to call | 444 // mocked the audio thread. Hence, there is no need to call |
| 445 // message_loop()->RunUntilIdle() after the Close() methods. | 445 // message_loop()->RunUntilIdle() after the Close() methods. |
| 446 aos->Close(); | 446 aos->Close(); |
| 447 ais->Close(); | 447 ais->Close(); |
| 448 } | 448 } |
| 449 | 449 |
| 450 } // namespace media | 450 } // namespace media |
| OLD | NEW |