MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DoWrite

Method DoWrite

Source/SampleFinder.cpp:250–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void 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
270void SampleFinder::UpdateZoomExtents()
271{

Callers

nothing calls this directly

Calls 5

ofGetTimestampStringFunction · 0.85
ClipToMethod · 0.80
ShiftWrapMethod · 0.80
LengthInSamplesMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected