OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <string.h> | 11 #include <string.h> |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "webrtc/test/gmock.h" | |
17 #include "webrtc/base/bind.h" | 16 #include "webrtc/base/bind.h" |
18 #include "webrtc/base/thread.h" | 17 #include "webrtc/base/thread.h" |
| 18 #include "webrtc/modules/audio_mixer/audio_mixer.h" |
19 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h" | 19 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h" |
20 #include "webrtc/modules/audio_mixer/audio_mixer.h" | 20 #include "webrtc/test/gmock.h" |
21 | 21 |
22 using testing::_; | 22 using testing::_; |
23 using testing::Exactly; | 23 using testing::Exactly; |
24 using testing::Invoke; | 24 using testing::Invoke; |
25 using testing::Return; | 25 using testing::Return; |
26 | 26 |
27 namespace webrtc { | 27 namespace webrtc { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 kAudioSources, MixerAudioSource::AudioFrameInfo::kNormal); | 499 kAudioSources, MixerAudioSource::AudioFrameInfo::kNormal); |
500 frame_info[0] = MixerAudioSource::AudioFrameInfo::kMuted; | 500 frame_info[0] = MixerAudioSource::AudioFrameInfo::kMuted; |
501 std::fill(frames[0].data_, frames[0].data_ + kDefaultSampleRateHz / 100, | 501 std::fill(frames[0].data_, frames[0].data_ + kDefaultSampleRateHz / 100, |
502 std::numeric_limits<int16_t>::max()); | 502 std::numeric_limits<int16_t>::max()); |
503 std::vector<bool> expected_status(kAudioSources, true); | 503 std::vector<bool> expected_status(kAudioSources, true); |
504 expected_status[0] = false; | 504 expected_status[0] = false; |
505 | 505 |
506 MixAndCompare(frames, frame_info, expected_status); | 506 MixAndCompare(frames, frame_info, expected_status); |
507 } | 507 } |
508 } // namespace webrtc | 508 } // namespace webrtc |
OLD | NEW |