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 #ifndef PAPPI_TESTS_TEST_AUDIO_H_ | 5 #ifndef PAPPI_TESTS_TEST_AUDIO_H_ |
6 #define PAPPI_TESTS_TEST_AUDIO_H_ | 6 #define PAPPI_TESTS_TEST_AUDIO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/ppb_audio.h" | 10 #include "ppapi/c/ppb_audio.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 private: | 24 private: |
25 std::string TestCreation(); | 25 std::string TestCreation(); |
26 std::string TestDestroyNoStop(); | 26 std::string TestDestroyNoStop(); |
27 std::string TestFailures(); | 27 std::string TestFailures(); |
28 std::string TestAudioCallback1(); | 28 std::string TestAudioCallback1(); |
29 std::string TestAudioCallback2(); | 29 std::string TestAudioCallback2(); |
30 std::string TestAudioCallback3(); | 30 std::string TestAudioCallback3(); |
31 std::string TestAudioCallback4(); | 31 std::string TestAudioCallback4(); |
32 | 32 |
| 33 #if defined(__native_client__) |
| 34 std::string TestAudioThreadCreatorIsRequired(); |
| 35 std::string TestAudioThreadCreatorIsCalled(); |
| 36 #endif |
| 37 |
33 // Calls |audio_callback_method_| (where |user_data| is "this"). | 38 // Calls |audio_callback_method_| (where |user_data| is "this"). |
34 static void AudioCallbackTrampoline(void* sample_buffer, | 39 static void AudioCallbackTrampoline(void* sample_buffer, |
35 uint32_t buffer_size_in_bytes, | 40 uint32_t buffer_size_in_bytes, |
36 PP_TimeDelta latency, | 41 PP_TimeDelta latency, |
37 void* user_data); | 42 void* user_data); |
38 static void AudioCallbackTrampoline1_0(void* sample_buffer, | 43 static void AudioCallbackTrampoline1_0(void* sample_buffer, |
39 uint32_t buffer_size_in_bytes, | 44 uint32_t buffer_size_in_bytes, |
40 void* user_data); | 45 void* user_data); |
41 | 46 |
42 typedef void (TestAudio::*AudioCallbackMethod)(void* sample_buffer, | 47 typedef void (TestAudio::*AudioCallbackMethod)(void* sample_buffer, |
(...skipping 24 matching lines...) Expand all Loading... |
67 bool test_done_; | 72 bool test_done_; |
68 | 73 |
69 // Raw C-level interfaces, set in |Init()|; do not modify them elsewhere. | 74 // Raw C-level interfaces, set in |Init()|; do not modify them elsewhere. |
70 const PPB_Audio_1_1* audio_interface_; | 75 const PPB_Audio_1_1* audio_interface_; |
71 const PPB_Audio_1_0* audio_interface_1_0_; | 76 const PPB_Audio_1_0* audio_interface_1_0_; |
72 const PPB_AudioConfig* audio_config_interface_; | 77 const PPB_AudioConfig* audio_config_interface_; |
73 const PPB_Core* core_interface_; | 78 const PPB_Core* core_interface_; |
74 }; | 79 }; |
75 | 80 |
76 #endif // PAPPI_TESTS_TEST_AUDIO_H_ | 81 #endif // PAPPI_TESTS_TEST_AUDIO_H_ |
OLD | NEW |