tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mock_expand.h (1979B)


      1 /*
      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 
     11 #ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
     12 #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
     13 
     14 #include <cstddef>
     15 
     16 #include "modules/audio_coding/neteq/expand.h"
     17 #include "test/gmock.h"
     18 
     19 namespace webrtc {
     20 
     21 class MockExpand : public Expand {
     22 public:
     23  MockExpand(BackgroundNoise* background_noise,
     24             SyncBuffer* sync_buffer,
     25             RandomVector* random_vector,
     26             StatisticsCalculator* statistics,
     27             int fs,
     28             size_t num_channels)
     29      : Expand(background_noise,
     30               sync_buffer,
     31               random_vector,
     32               statistics,
     33               fs,
     34               num_channels) {}
     35  ~MockExpand() override { Die(); }
     36  MOCK_METHOD(void, Die, ());
     37  MOCK_METHOD(void, Reset, (), (override));
     38  MOCK_METHOD(int, Process, (AudioMultiVector * output), (override));
     39  MOCK_METHOD(void, SetParametersForNormalAfterExpand, (), (override));
     40  MOCK_METHOD(void, SetParametersForMergeAfterExpand, (), (override));
     41  MOCK_METHOD(size_t, overlap_length, (), (const, override));
     42 };
     43 
     44 }  // namespace webrtc
     45 
     46 namespace webrtc {
     47 
     48 class MockExpandFactory : public ExpandFactory {
     49 public:
     50  MOCK_METHOD(Expand*,
     51              Create,
     52              (BackgroundNoise * background_noise,
     53               SyncBuffer* sync_buffer,
     54               RandomVector* random_vector,
     55               StatisticsCalculator* statistics,
     56               int fs,
     57               size_t num_channels),
     58              (const, override));
     59 };
     60 
     61 }  // namespace webrtc
     62 #endif  // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_