#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer.h"
#include <stddef.h>
#include <algorithm>
#include <limits>
#include <memory>
#include <tuple>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/task_environment.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "media/base/fake_audio_render_callback.h"
#include "media/base/mock_audio_renderer_sink.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_input.h"
#include "third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_pool.h"
namespace blink {
constexpr int kMixerInputs = …;
constexpr int kOddMixerInputs = …;
constexpr int kMixerCycles = …;
constexpr media::ChannelLayout kChannelLayout = …;
constexpr int kHighLatencyBufferSize = …;
constexpr int kLowLatencyBufferSize = …;
constexpr int kSineCycles = …;
constexpr int kTestInputLower = …;
constexpr int kTestInputHigher = …;
constexpr int kTestInput3Rates[] = …;
AudioRendererMixerTestData;
class AudioRendererMixerTest
: public testing::TestWithParam<AudioRendererMixerTestData>,
public AudioRendererMixerPool { … };
class AudioRendererMixerBehavioralTest : public AudioRendererMixerTest { … };
ACTION_P(SignalEvent, event) { … }
TEST_P(AudioRendererMixerTest, NoInputs) { … }
TEST_P(AudioRendererMixerTest, OneInputStart) { … }
TEST_P(AudioRendererMixerTest, ManyInputStart) { … }
TEST_P(AudioRendererMixerTest, OneInputPlay) { … }
TEST_P(AudioRendererMixerTest, ManyInputPlay) { … }
TEST_P(AudioRendererMixerTest, OneInputPlayVolumeAdjusted) { … }
TEST_P(AudioRendererMixerTest, ManyInputPlayVolumeAdjusted) { … }
TEST_P(AudioRendererMixerTest, OneInputPlayPartialRender) { … }
TEST_P(AudioRendererMixerTest, ManyInputPlayPartialRender) { … }
TEST_P(AudioRendererMixerTest, OneInputPause) { … }
TEST_P(AudioRendererMixerTest, ManyInputPause) { … }
TEST_P(AudioRendererMixerTest, OneInputStop) { … }
TEST_P(AudioRendererMixerTest, ManyInputStop) { … }
TEST_P(AudioRendererMixerTest, ManyInputMixedStopPlay) { … }
TEST_P(AudioRendererMixerTest, ManyInputMixedStopPlayOdd) { … }
TEST_P(AudioRendererMixerTest, PropagatesAudioGlitchInfo) { … }
TEST_P(AudioRendererMixerBehavioralTest, OnRenderError) { … }
TEST_P(AudioRendererMixerBehavioralTest, OnRenderErrorPausedInput) { … }
TEST_P(AudioRendererMixerBehavioralTest, MixerPausesStream) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}