mock_audio_device_buffer.h (1425B)
1 /* 2 * Copyright (c) 2013 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_DEVICE_MOCK_AUDIO_DEVICE_BUFFER_H_ 12 #define MODULES_AUDIO_DEVICE_MOCK_AUDIO_DEVICE_BUFFER_H_ 13 14 #include <cstddef> 15 #include <cstdint> 16 #include <optional> 17 18 #include "modules/audio_device/audio_device_buffer.h" 19 #include "test/gmock.h" 20 21 namespace webrtc { 22 23 class MockAudioDeviceBuffer : public AudioDeviceBuffer { 24 public: 25 using AudioDeviceBuffer::AudioDeviceBuffer; 26 virtual ~MockAudioDeviceBuffer() {} 27 MOCK_METHOD(int32_t, RequestPlayoutData, (size_t nSamples), (override)); 28 MOCK_METHOD(int32_t, GetPlayoutData, (void* audioBuffer), (override)); 29 MOCK_METHOD(int32_t, 30 SetRecordedBuffer, 31 (const void* audioBuffer, 32 size_t nSamples, 33 std::optional<int64_t> capture_time_ns), 34 (override)); 35 MOCK_METHOD(void, SetVQEData, (int playDelayMS, int recDelayMS), (override)); 36 MOCK_METHOD(int32_t, DeliverRecordedData, (), (override)); 37 }; 38 39 } // namespace webrtc 40 41 #endif // MODULES_AUDIO_DEVICE_MOCK_AUDIO_DEVICE_BUFFER_H_