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 <windows.h> | 5 #include <windows.h> |
6 #include <mmsystem.h> | 6 #include <mmsystem.h> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 Return(bytes_per_packet))); | 444 Return(bytes_per_packet))); |
445 | 445 |
446 aos->Start(&source); | 446 aos->Start(&source); |
447 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), | 447 loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), |
448 TestTimeouts::action_timeout_ms()); | 448 TestTimeouts::action_timeout_ms()); |
449 loop.Run(); | 449 loop.Run(); |
450 aos->Stop(); | 450 aos->Stop(); |
451 aos->Close(); | 451 aos->Close(); |
452 } | 452 } |
453 | 453 |
454 TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestMono) { | 454 // TODO(henrika): enable this test again using an improved fall-back |
| 455 // mechanism for those platforms which does not support mono output. |
| 456 // See crbug.com/112986 for details. |
| 457 TEST(WinAudioOutputTest, DISABLED_WASAPIAudioOutputStreamTestMono) { |
455 scoped_refptr<AudioManager> audio_manager(AudioManager::Create()); | 458 scoped_refptr<AudioManager> audio_manager(AudioManager::Create()); |
456 if (!CanRunAudioTests(audio_manager)) | 459 if (!CanRunAudioTests(audio_manager)) |
457 return; | 460 return; |
458 | 461 |
459 MessageLoopForUI loop; | 462 MessageLoopForUI loop; |
460 scoped_refptr<base::MessageLoopProxy> proxy(loop.message_loop_proxy()); | 463 scoped_refptr<base::MessageLoopProxy> proxy(loop.message_loop_proxy()); |
461 | 464 |
462 MockAudioSourceCallback source; | 465 MockAudioSourceCallback source; |
463 | 466 |
464 // Create default WASAPI output stream which plays out in *mono* using | 467 // Create default WASAPI output stream which plays out in *mono* using |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 aos->Start(&file_source); | 535 aos->Start(&file_source); |
533 base::PlatformThread::Sleep( | 536 base::PlatformThread::Sleep( |
534 base::TimeDelta::FromMilliseconds(kFileDurationMs)); | 537 base::TimeDelta::FromMilliseconds(kFileDurationMs)); |
535 aos->Stop(); | 538 aos->Stop(); |
536 | 539 |
537 LOG(INFO) << ">> File playout has stopped."; | 540 LOG(INFO) << ">> File playout has stopped."; |
538 aos->Close(); | 541 aos->Close(); |
539 } | 542 } |
540 | 543 |
541 } // namespace media | 544 } // namespace media |
OLD | NEW |