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/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 using ::testing::AnyNumber; | 24 using ::testing::AnyNumber; |
25 using ::testing::DoAll; | 25 using ::testing::DoAll; |
26 using ::testing::Field; | 26 using ::testing::Field; |
27 using ::testing::InSequence; | 27 using ::testing::InSequence; |
28 using ::testing::NiceMock; | 28 using ::testing::NiceMock; |
29 using ::testing::NotNull; | 29 using ::testing::NotNull; |
30 using ::testing::Return; | 30 using ::testing::Return; |
31 | 31 |
32 using base::win::ScopedCOMInitializer; | 32 using base::win::ScopedCOMInitializer; |
33 | 33 |
| 34 namespace media { |
| 35 |
34 static const wchar_t kAudioFile1_16b_m_16K[] | 36 static const wchar_t kAudioFile1_16b_m_16K[] |
35 = L"media\\test\\data\\sweep02_16b_mono_16KHz.raw"; | 37 = L"media\\test\\data\\sweep02_16b_mono_16KHz.raw"; |
36 | 38 |
37 // This class allows to find out if the callbacks are occurring as | 39 // This class allows to find out if the callbacks are occurring as |
38 // expected and if any error has been reported. | 40 // expected and if any error has been reported. |
39 class TestSourceBasic : public AudioOutputStream::AudioSourceCallback { | 41 class TestSourceBasic : public AudioOutputStream::AudioSourceCallback { |
40 public: | 42 public: |
41 explicit TestSourceBasic() | 43 explicit TestSourceBasic() |
42 : callback_count_(0), | 44 : callback_count_(0), |
43 had_error_(0) { | 45 had_error_(0) { |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 &thread_context, 0, NULL); | 739 &thread_context, 0, NULL); |
738 | 740 |
739 oas->Start(&source); | 741 oas->Start(&source); |
740 | 742 |
741 ::WaitForSingleObject(thread, INFINITE); | 743 ::WaitForSingleObject(thread, INFINITE); |
742 ::CloseHandle(thread); | 744 ::CloseHandle(thread); |
743 | 745 |
744 oas->Stop(); | 746 oas->Stop(); |
745 oas->Close(); | 747 oas->Close(); |
746 } | 748 } |
| 749 |
| 750 } // namespace media |
OLD | NEW |