33{
34 const auto numChannels =
35 GENERATE(1 );
36
37 const auto mockSequence =
38 std::make_shared<MockPlayableSequence>(
sampleRate, numChannels);
39
40 SECTION(
41 "StretchingSequence and WaveTrack have identical outputs when clips aren't stretched.")
42 {
43 constexpr auto totalLength =
45
48 [](auto& clip) { clip.SetPlayStartTime(1.0); });
51 [](auto& clip) { clip.SetPlayStartTime(3.0); });
52
56 constexpr auto backwards = false;
58 REQUIRE(sut->DoGet(
60 AudioContainerHelper::GetData<char>(sutOutput).data(),
floatSample, 0u,
61 totalLength, backwards));
62
64 REQUIRE(track->DoGet(
66 AudioContainerHelper::GetData<char>(waveTrackOutput).data(),
68
69 const auto outputsAreIdentical =
70 sutOutput.channelVectors == waveTrackOutput.channelVectors;
71 REQUIRE(outputsAreIdentical);
72 }
73}
std::vector< std::shared_ptr< const ClipInterface > > ClipConstHolders
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
TestWaveClipMaker clipMaker
TestWaveTrackMaker trackMaker