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 | |
36 static const wchar_t kAudioFile1_16b_m_16K[] | 34 static const wchar_t kAudioFile1_16b_m_16K[] |
37 = L"media\\test\\data\\sweep02_16b_mono_16KHz.raw"; | 35 = L"media\\test\\data\\sweep02_16b_mono_16KHz.raw"; |
38 | 36 |
39 // This class allows to find out if the callbacks are occurring as | 37 // This class allows to find out if the callbacks are occurring as |
40 // expected and if any error has been reported. | 38 // expected and if any error has been reported. |
41 class TestSourceBasic : public AudioOutputStream::AudioSourceCallback { | 39 class TestSourceBasic : public AudioOutputStream::AudioSourceCallback { |
42 public: | 40 public: |
43 explicit TestSourceBasic() | 41 explicit TestSourceBasic() |
44 : callback_count_(0), | 42 : callback_count_(0), |
45 had_error_(0) { | 43 had_error_(0) { |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 &thread_context, 0, NULL); | 737 &thread_context, 0, NULL); |
740 | 738 |
741 oas->Start(&source); | 739 oas->Start(&source); |
742 | 740 |
743 ::WaitForSingleObject(thread, INFINITE); | 741 ::WaitForSingleObject(thread, INFINITE); |
744 ::CloseHandle(thread); | 742 ::CloseHandle(thread); |
745 | 743 |
746 oas->Stop(); | 744 oas->Stop(); |
747 oas->Close(); | 745 oas->Close(); |
748 } | 746 } |
749 | |
750 } // namespace media | |
OLD | NEW |