19#include <catch2/catch.hpp>
34 const auto numChannels =
37 const auto mockSequence =
38 std::make_shared<MockPlayableSequence>(
sampleRate, numChannels);
41 "StretchingSequence and WaveTrack have identical outputs when clips aren't stretched.")
43 constexpr auto totalLength =
48 [](
auto& clip) { clip.SetPlayStartTime(1.0); });
51 [](
auto& clip) { clip.SetPlayStartTime(3.0); });
56 constexpr auto backwards =
false;
60 AudioContainerHelper::GetData<char>(sutOutput).data(),
floatSample, 0u,
61 totalLength, backwards));
66 AudioContainerHelper::GetData<char>(waveTrackOutput).data(),
69 const auto outputsAreIdentical =
71 REQUIRE(outputsAreIdentical);
std::vector< std::shared_ptr< const ClipInterface > > ClipConstHolders
TEST_CASE("StretchingSequence integration tests")
static std::shared_ptr< StretchingSequence > Create(const PlayableSequence &, const ClipConstHolders &clips)
WaveClipHolder ClipFilledWith(const std::vector< std::vector< float > > &values, Operations operations=[](WaveClip &) {}) const
std::shared_ptr< WaveTrack > Track(const WaveClipHolders &clips) const
constexpr auto sampleRate
const auto sampleBlockFactory
TestWaveClipMaker clipMaker
TestWaveTrackMaker trackMaker
std::vector< std::vector< float > > channelVectors