blob: 286325b841ed701cfecc3e8d600882e70efded5e [file] [log] [blame]
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +00001/*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
12#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "modules/audio_coding/neteq/expand.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "test/gmock.h"
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000016
17namespace webrtc {
18
19class MockExpand : public Expand {
20 public:
21 MockExpand(BackgroundNoise* background_noise,
22 SyncBuffer* sync_buffer,
23 RandomVector* random_vector,
Henrik Lundinbef77e22015-08-18 14:58:09 +020024 StatisticsCalculator* statistics,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000025 int fs,
26 size_t num_channels)
Henrik Lundinbef77e22015-08-18 14:58:09 +020027 : Expand(background_noise,
28 sync_buffer,
29 random_vector,
30 statistics,
31 fs,
32 num_channels) {}
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000033 virtual ~MockExpand() { Die(); }
34 MOCK_METHOD0(Die, void());
Yves Gerey665174f2018-06-19 15:03:05 +020035 MOCK_METHOD0(Reset, void());
36 MOCK_METHOD1(Process, int(AudioMultiVector* output));
37 MOCK_METHOD0(SetParametersForNormalAfterExpand, void());
38 MOCK_METHOD0(SetParametersForMergeAfterExpand, void());
39 MOCK_CONST_METHOD0(overlap_length, size_t());
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000040};
41
42} // namespace webrtc
43
44namespace webrtc {
45
46class MockExpandFactory : public ExpandFactory {
47 public:
Henrik Lundinbef77e22015-08-18 14:58:09 +020048 MOCK_CONST_METHOD6(Create,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000049 Expand*(BackgroundNoise* background_noise,
50 SyncBuffer* sync_buffer,
51 RandomVector* random_vector,
Henrik Lundinbef77e22015-08-18 14:58:09 +020052 StatisticsCalculator* statistics,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000053 int fs,
54 size_t num_channels));
55};
56
57} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020058#endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_