18 const auto numChars = numsamples *
SAMPLE_SIZE(srcformat);
19 std::vector<char> data(numChars);
20 std::copy(src, src + numChars, data.begin());
28 , srcFormat { srcformat }
53 float* dest,
size_t frameoffset,
size_t numframes)
59 float* dest,
size_t frameoffset,
size_t numframes)
78 const auto numChars = numsamples *
SAMPLE_SIZE(destformat);
80 data.data() + charOffset,
data.data() + charOffset + numChars, dest);
96 std::vector<float> floatData {
reinterpret_cast<const float*
>(
data.data()),
97 reinterpret_cast<const float*
>(
99 return std::make_shared<std::vector<float>>(floatData);
std::shared_ptr< std::vector< float > > BlockSampleView
MockSampleBlock(long long id, constSamplePtr src, size_t numsamples, sampleFormat srcformat)
SampleBlockID GetBlockID() const override
bool GetSummary64k(float *dest, size_t frameoffset, size_t numframes) override
Non-throwing, should fill with zeroes on failure.
MinMaxRMS DoGetMinMaxRMS() const override
sampleFormat GetSampleFormat() const override
void CloseLock() noexcept override
void SaveXML(XMLWriter &) override
bool GetSummary256(float *dest, size_t frameoffset, size_t numframes) override
Non-throwing, should fill with zeroes on failure.
size_t GetSampleCount() const override
size_t DoGetSamples(samplePtr dest, sampleFormat destformat, size_t sampleoffset, size_t numsamples) override
const sampleFormat srcFormat
const std::vector< char > data
BlockSampleView GetFloatSampleView(bool mayThrow) override
size_t GetSpaceUsage() const override
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
std::vector< char > copyToVector(constSamplePtr src, size_t numsamples, sampleFormat srcformat)
void copy(const T *src, T *dst, int32_t n)