| 169 | } |
| 170 | |
| 171 | bool 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 | |
| 189 | std::shared_ptr<StretchingSequence> StretchingSequence::Create( |
| 190 | const PlayableSequence& sequence, const ClipConstHolders& clips) |