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

Method LoadState

Source/SamplerGrid.cpp:476–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476void SamplerGrid::LoadState(FileStreamIn& in, int rev)
477{
478 IDrawableModule::LoadState(in, rev);
479
480 if (ModularSynth::sLoadingFileSaveStateRev < 423)
481 in >> rev;
482 LoadStateValidate(rev <= GetModuleSaveStateRev());
483
484 //LoadStateValidate(false); //TODO(Ryan) temp hack fix because samplergrid was loading funny
485
486 for (int i = 0; i < mCols * mRows; ++i)
487 {
488 in >> mGridSamples[i].mPlayhead;
489 in >> mGridSamples[i].mHasSample;
490 in >> mGridSamples[i].mSampleLength;
491 in >> mGridSamples[i].mSampleStart;
492 in >> mGridSamples[i].mSampleEnd;
493 if (mGridSamples[i].mHasSample)
494 in.Read(mGridSamples[i].mSampleData, mGridSamples[i].mSampleLength);
495 }
496}

Callers

nothing calls this directly

Calls 2

LoadStateValidateFunction · 0.85
ReadMethod · 0.45

Tested by

no test coverage detected