| 248 | } |
| 249 | |
| 250 | void SampleFinder::DoWrite() |
| 251 | { |
| 252 | if (mSample) |
| 253 | { |
| 254 | mSample->ClipTo(mClipStart, mClipEnd); |
| 255 | int shift = mOffset * (mClipEnd - mClipStart); |
| 256 | if (shift < 0) |
| 257 | shift += mClipEnd - mClipStart; |
| 258 | mSample->ShiftWrap(shift); |
| 259 | mSample->Write(ofGetTimestampString("loops/sample_%Y-%m-%d_%H-%M.wav").c_str()); |
| 260 | mClipStart = 0; |
| 261 | mClipEnd = mSample->LengthInSamples(); |
| 262 | mOffset = 0; |
| 263 | |
| 264 | mZoomStart = 0; |
| 265 | mZoomEnd = mClipEnd; |
| 266 | UpdateZoomExtents(); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | void SampleFinder::UpdateZoomExtents() |
| 271 | { |
nothing calls this directly
no test coverage detected