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

Method SaveState

Source/SamplerGrid.cpp:458–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458void SamplerGrid::SaveState(FileStreamOut& out)
459{
460 out << GetModuleSaveStateRev();
461
462 IDrawableModule::SaveState(out);
463
464 for (int i = 0; i < mCols * mRows; ++i)
465 {
466 out << mGridSamples[i].mPlayhead;
467 out << mGridSamples[i].mHasSample;
468 out << mGridSamples[i].mSampleLength;
469 out << mGridSamples[i].mSampleStart;
470 out << mGridSamples[i].mSampleEnd;
471 if (mGridSamples[i].mHasSample)
472 out.Write(mGridSamples[i].mSampleData, mGridSamples[i].mSampleLength);
473 }
474}
475
476void SamplerGrid::LoadState(FileStreamIn& in, int rev)
477{

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected