| 160 | CutPreviewPlaybackPolicy::~CutPreviewPlaybackPolicy() = default; |
| 161 | |
| 162 | void CutPreviewPlaybackPolicy::Initialize( |
| 163 | PlaybackSchedule &schedule, double rate) |
| 164 | { |
| 165 | PlaybackPolicy::Initialize(schedule, rate); |
| 166 | |
| 167 | // Examine mT0 and mT1 in the schedule only now; ignore changes during play |
| 168 | double left = mStart = schedule.mT0; |
| 169 | double right = mEnd = schedule.mT1; |
| 170 | mReversed = left > right; |
| 171 | if (mReversed) |
| 172 | std::swap(left, right); |
| 173 | |
| 174 | if (left < mGapLeft) |
| 175 | mDuration1 = schedule.ComputeWarpedLength(left, mGapLeft); |
| 176 | const auto gapEnd = mGapLeft + mGapLength; |
| 177 | if (gapEnd < right) |
| 178 | mDuration2 = schedule.ComputeWarpedLength(gapEnd, right); |
| 179 | if (mReversed) |
| 180 | std::swap(mDuration1, mDuration2); |
| 181 | if (sampleCount(mDuration2 * rate) == 0) |
| 182 | mDuration2 = mDuration1, mDuration1 = 0; |
| 183 | mInitDuration1 = mDuration1; |
| 184 | mInitDuration2 = mDuration2; |
| 185 | } |
| 186 | |
| 187 | bool CutPreviewPlaybackPolicy::Done(PlaybackSchedule &schedule, unsigned long) |
| 188 | { |
nothing calls this directly
no test coverage detected