#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stdint.h>
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/task_environment.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_glitch_info.h"
#include "media/base/audio_parameters.h"
#include "media/base/audio_timestamp_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/modules/mediastream/web_media_stream_audio_sink.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_heap.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_deliverer.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_source.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_audio_track.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_component_impl.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_source.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_track_platform.h"
namespace blink {
namespace {
constexpr int kSampleRate = …;
constexpr int kBufferSize = …;
constexpr int kMaxValueSafelyConvertableToFloat = …;
class FakeMediaStreamAudioSource final : public MediaStreamAudioSource,
public base::PlatformThread::Delegate { … };
class FakeMediaStreamAudioSink final : public WebMediaStreamAudioSink { … };
}
class MediaStreamAudioTest : public ::testing::Test { … };
TEST_F(MediaStreamAudioTest, BasicUsage) { … }
TEST_F(MediaStreamAudioTest, ConnectTrackAfterSourceStopped) { … }
TEST_F(MediaStreamAudioTest, AddSinkToStoppedTrack) { … }
TEST_F(MediaStreamAudioTest, FormatChangesPropagate) { … }
TEST_F(MediaStreamAudioTest, EnableAndDisableTracks) { … }
TEST(MediaStreamAudioTestStandalone, GetAudioFrameStats) { … }
}