MCPcopy Create free account
hub / github.com/audacity/audacity / MutableGet

Method MutableGet

libraries/lib-stretching-sequence/StretchingSequence.cpp:171–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171bool StretchingSequence::MutableGet(
172 size_t iChannel, size_t nBuffers, const samplePtr buffers[],
173 sampleFormat format, sampleCount start, size_t len, bool backwards)
174{
175 // StretchingSequence is not expected to be used for any other case.
176 assert(iChannel == 0u);
177 if (
178 !mExpectedStart.has_value() || *mExpectedStart != start ||
179 (mPlaybackDirection == PlaybackDirection::backward != backwards))
180 {
181 const auto t = start.as_double() / mSequence.GetRate();
182 ResetCursor(
183 t,
184 backwards ? PlaybackDirection::backward : PlaybackDirection::forward);
185 }
186 return GetNext(reinterpret_cast<float* const*>(buffers), nBuffers, len);
187}
188
189std::shared_ptr<StretchingSequence> StretchingSequence::Create(
190 const PlayableSequence& sequence, const ClipConstHolders& clips)

Callers 1

DoGetMethod · 0.80

Calls 2

has_valueMethod · 0.80
GetRateMethod · 0.45

Tested by

no test coverage detected