Audacity 3.2.0
Functions | Variables
anonymous_namespace{StaffPadTimeAndPitch.cpp} Namespace Reference

Functions

void GetOffsetBuffer (float **offsetBuffer, float *const *buffer, size_t numChannels, size_t offset)
 
std::unique_ptr< staffpad::TimeAndPitchMaybeCreateTimeAndPitch (int sampleRate, size_t numChannels, const TimeAndPitchInterface::Parameters &params)
 

Variables

constexpr auto maxBlockSize = 1024
 

Function Documentation

◆ GetOffsetBuffer()

void anonymous_namespace{StaffPadTimeAndPitch.cpp}::GetOffsetBuffer ( float **  offsetBuffer,
float *const *  buffer,
size_t  numChannels,
size_t  offset 
)

Definition at line 14 of file StaffPadTimeAndPitch.cpp.

17{
18 for (auto i = 0u; i < numChannels; ++i)
19 offsetBuffer[i] = buffer[i] + offset;
20}

Referenced by StaffPadTimeAndPitch::GetSamples().

Here is the caller graph for this function:

◆ MaybeCreateTimeAndPitch()

std::unique_ptr< staffpad::TimeAndPitch > anonymous_namespace{StaffPadTimeAndPitch.cpp}::MaybeCreateTimeAndPitch ( int  sampleRate,
size_t  numChannels,
const TimeAndPitchInterface::Parameters params 
)

Definition at line 22 of file StaffPadTimeAndPitch.cpp.

25{
26 const auto timeRatio = params.timeRatio.value_or(1.);
27 const auto pitchRatio = params.pitchRatio.value_or(1.);
28 if (
31 {
32 return nullptr;
33 }
34 auto timeAndPitch = std::make_unique<staffpad::TimeAndPitch>(sampleRate);
35 timeAndPitch->setup(static_cast<int>(numChannels), maxBlockSize);
36 timeAndPitch->setTimeStretchAndPitchFactor(timeRatio, pitchRatio);
37 return timeAndPitch;
38}
EffectDistortionSettings params
Definition: Distortion.cpp:77
static bool IsPassThroughMode(double stretchRatio)

References TimeAndPitchInterface::IsPassThroughMode(), maxBlockSize, params, and anonymous_namespace{ClipSegmentTest.cpp}::sampleRate.

Referenced by StaffPadTimeAndPitch::OnCentShiftChange().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ maxBlockSize

constexpr auto anonymous_namespace{StaffPadTimeAndPitch.cpp}::maxBlockSize = 1024
constexpr