#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/protocol/webrtc_audio_source_adapter.h"
#include <numeric>
#include <vector>
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "remoting/proto/audio.pb.h"
#include "remoting/protocol/fake_audio_source.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/api/media_stream_interface.h"
#include "third_party/webrtc/rtc_base/ref_count.h"
#include "third_party/webrtc/rtc_base/ref_counted_object.h"
namespace remoting::protocol {
namespace {
const int kSampleRate = …;
const int kBytesPerSample = …;
const int kChannels = …;
constexpr auto kFrameDuration = …;
class FakeAudioSink : public webrtc::AudioTrackSinkInterface { … };
}
class WebrtcAudioSourceAdapterTest : public testing::Test { … };
TEST_F(WebrtcAudioSourceAdapterTest, PartialFrames) { … }
}