chromium/media/base/audio_push_fifo_unittest.cc

// Copyright 2016 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 <limits>
#include <memory>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_push_fifo.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

namespace {

class AudioPushFifoTest : public testing::TestWithParam<int> {};

// Tests an atypical edge case: Push()ing one frame at a time.
TEST_P(AudioPushFifoTest, PushOneFrameAtATime) {}

// Tests that re-chunking the audio from common platform input chunk sizes
// works.
TEST_P(AudioPushFifoTest, Push128FramesAtATime) {}
TEST_P(AudioPushFifoTest, Push512FramesAtATime) {}

// Tests that re-chunking the audio from common "10 ms" input chunk sizes
// works (44100 Hz * 10 ms = 441, and 48000 Hz * 10 ms = 480).
TEST_P(AudioPushFifoTest, Push441FramesAtATime) {}
TEST_P(AudioPushFifoTest, Push480FramesAtATime) {}

// Tests that re-chunking when input audio is provided in varying chunk sizes
// works.
TEST_P(AudioPushFifoTest, PushArbitraryNumbersOfFramesAtATime) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace

}  // namespace media