Audacity 3.2.0
Functions
anonymous_namespace{MockSampleBlock.cpp} Namespace Reference

Functions

std::vector< char > copyToVector (constSamplePtr src, size_t numsamples, sampleFormat srcformat)
 

Detailed Description


Audacity: A Digital Audio Editor

MockSampleBlock.cpp

Matthieu Hodgkinson

Function Documentation

◆ copyToVector()

std::vector< char > anonymous_namespace{MockSampleBlock.cpp}::copyToVector ( constSamplePtr  src,
size_t  numsamples,
sampleFormat  srcformat 
)

Definition at line 16 of file MockSampleBlock.cpp.

17{
18 const auto numChars = numsamples * SAMPLE_SIZE(srcformat);
19 std::vector<char> data(numChars);
20 std::copy(src, src + numChars, data.begin());
21 return data;
22}
#define SAMPLE_SIZE(SampleFormat)
Definition: SampleFormat.h:52
void copy(const T *src, T *dst, int32_t n)
Definition: VectorOps.h:40

References staffpad::vo::copy(), and SAMPLE_SIZE.

Here is the call graph for this function: