15#include <catch2/catch.hpp>
27 : numSamples { numSamples }
39 ReadFloats(
float* buffer,
long long where,
size_t numFrames)
const override
42 REQUIRE(where + numFrames <= numSamples);
48 SECTION(
"handles empty files")
52 REQUIRE(!sut.GetNextFrame(frame));
54 SECTION(
"handles very short files")
58 REQUIRE(!sut.GetNextFrame(frame));
60 SECTION(
"has power-of-two number of frames")
65 SECTION(
"respects MirAudioReader boundaries")
67 TestMirAudioReader reader { 123456 };
70 while (sut.GetNextFrame(frame))
void ReadFloats(float *buffer, long long where, size_t numFrames) const override
const long long numSamples
TestMirAudioReader(long long numSamples)
double GetSampleRate() const override
long long GetNumSamples() const override
TEST_CASE("GetBpmFromFilename")
constexpr auto IsPowOfTwo(int x)
A vector of floats guaranteeing alignment as demanded by pffft.