OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Tests PPB_MediaStreamAudioTrack interface. | 5 // Tests PPB_MediaStreamAudioTrack interface. |
6 | 6 |
7 #include "ppapi/tests/test_media_stream_audio_track.h" | 7 #include "ppapi/tests/test_media_stream_audio_track.h" |
8 | 8 |
9 // For MSVC. | 9 // For MSVC. |
10 #define _USE_MATH_DEFINES | 10 #define _USE_MATH_DEFINES |
11 #include <math.h> | 11 #include <math.h> |
| 12 #include <stddef.h> |
12 #include <stdint.h> | 13 #include <stdint.h> |
13 | 14 |
14 #include <algorithm> | 15 #include <algorithm> |
15 | 16 |
16 #include "ppapi/c/private/ppb_testing_private.h" | 17 #include "ppapi/c/private/ppb_testing_private.h" |
17 #include "ppapi/cpp/audio_buffer.h" | 18 #include "ppapi/cpp/audio_buffer.h" |
18 #include "ppapi/cpp/completion_callback.h" | 19 #include "ppapi/cpp/completion_callback.h" |
19 #include "ppapi/cpp/instance.h" | 20 #include "ppapi/cpp/instance.h" |
20 #include "ppapi/cpp/var.h" | 21 #include "ppapi/cpp/var.h" |
21 #include "ppapi/tests/test_utils.h" | 22 #include "ppapi/tests/test_utils.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 expected = INT16_MAX * sin(angle); | 465 expected = INT16_MAX * sin(angle); |
465 ASSERT_GE(right, std::max<int16_t>(expected, INT16_MIN + 1) - 1); | 466 ASSERT_GE(right, std::max<int16_t>(expected, INT16_MIN + 1) - 1); |
466 ASSERT_LE(right, std::min<int16_t>(expected, INT16_MAX - 1) + 1); | 467 ASSERT_LE(right, std::min<int16_t>(expected, INT16_MAX - 1) + 1); |
467 } | 468 } |
468 | 469 |
469 audio_track_.RecycleBuffer(buffer); | 470 audio_track_.RecycleBuffer(buffer); |
470 } | 471 } |
471 | 472 |
472 PASS(); | 473 PASS(); |
473 } | 474 } |
OLD | NEW |