OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 aos->Close(); | 482 aos->Close(); |
483 } | 483 } |
484 | 484 |
485 // This test is intended for manual tests and should only be enabled | 485 // This test is intended for manual tests and should only be enabled |
486 // when it is required to store the captured data on a local file. | 486 // when it is required to store the captured data on a local file. |
487 // By default, GTest will print out YOU HAVE 1 DISABLED TEST. | 487 // By default, GTest will print out YOU HAVE 1 DISABLED TEST. |
488 // To include disabled tests in test execution, just invoke the test program | 488 // To include disabled tests in test execution, just invoke the test program |
489 // with --gtest_also_run_disabled_tests or set the GTEST_ALSO_RUN_DISABLED_TESTS | 489 // with --gtest_also_run_disabled_tests or set the GTEST_ALSO_RUN_DISABLED_TESTS |
490 // environment variable to a value greater than 0. | 490 // environment variable to a value greater than 0. |
491 // The test files are approximately 20 seconds long. | 491 // The test files are approximately 20 seconds long. |
492 TEST(WinAudioOutputTest, DISABLE_WASAPIAudioOutputStreamReadFromFile) { | 492 TEST(WinAudioOutputTest, DISABLED_WASAPIAudioOutputStreamReadFromFile) { |
493 if (!CanRunAudioTests()) | 493 if (!CanRunAudioTests()) |
494 return; | 494 return; |
495 | 495 |
496 AudioOutputStreamWrapper aosw; | 496 AudioOutputStreamWrapper aosw; |
497 AudioOutputStream* aos = aosw.Create(); | 497 AudioOutputStream* aos = aosw.Create(); |
498 EXPECT_TRUE(aos->Open()); | 498 EXPECT_TRUE(aos->Open()); |
499 | 499 |
500 std::string file_name; | 500 std::string file_name; |
501 if (aosw.sample_rate() == 48000) { | 501 if (aosw.sample_rate() == 48000) { |
502 file_name = kSpeechFile_16b_s_48k; | 502 file_name = kSpeechFile_16b_s_48k; |
(...skipping 16 matching lines...) Expand all Loading... |
519 | 519 |
520 aos->Start(&file_source); | 520 aos->Start(&file_source); |
521 base::PlatformThread::Sleep(file_duration_ms); | 521 base::PlatformThread::Sleep(file_duration_ms); |
522 aos->Stop(); | 522 aos->Stop(); |
523 | 523 |
524 LOG(INFO) << ">> File playout has stopped."; | 524 LOG(INFO) << ">> File playout has stopped."; |
525 aos->Close(); | 525 aos->Close(); |
526 } | 526 } |
527 | 527 |
528 } // namespace media | 528 } // namespace media |
OLD | NEW |