chromium/media/base/audio_converter_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/base/audio_converter.h"

#include <stddef.h>

#include <memory>
#include <tuple>

#include "base/strings/string_number_conversions.h"
#include "media/base/audio_timestamp_helper.h"
#include "media/base/fake_audio_render_callback.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

// Parameters which control the many input case tests.
static const int kConvertInputs =;
static const int kConvertCycles =;

// Parameters used for testing.
static constexpr ChannelLayout kChannelLayout =;
static const int kHighLatencyBufferSize =;
static const int kLowLatencyBufferSize =;
static const int kSampleRate =;

// Number of full sine wave cycles for each Render() call.
static const int kSineCycles =;

// Tuple of <input rate, output rate, output channel layout config, epsilon>.
AudioConverterTestData;
class AudioConverterTest
    : public testing::TestWithParam<AudioConverterTestData> {};

// Ensure the buffer delay provided by AudioConverter is accurate.
TEST(AudioConverterTest, AudioDelayAndDiscreteChannelCount) {}

// Ensure that glitch info is propagated to all callbacks.
TEST(AudioConverterTest, PropagatesGlitchInfo) {}

TEST_P(AudioConverterTest, ArbitraryOutputRequestSize) {}

TEST_P(AudioConverterTest, NoInputs) {}

TEST_P(AudioConverterTest, OneInput) {}

TEST_P(AudioConverterTest, ManyInputs) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace media