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

Method LoadSample

Source/DrumPlayer.cpp:1178–1188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1176}
1177
1178void DrumPlayer::DrumHit::LoadSample(std::string path)
1179{
1180 mOwner->LoadSampleLock();
1181 mSample.Read(path.c_str());
1182 mOwner->LoadSampleUnlock();
1183 //mSample.Play(gTime, mSpeed, 0);
1184 //mVelocity = .5f;
1185 mEnvelopeLength = mSample.LengthInSamples() * gInvSampleRateMs;
1186 for (size_t i = 0; i < mPlayheads.size(); ++i)
1187 mPlayheads[i].mStartTime = -1;
1188}
1189
1190void DrumPlayer::DrumHit::LoadRandomSample()
1191{

Callers 1

LoadSongMethod · 0.45

Calls 5

LoadSampleLockMethod · 0.80
LoadSampleUnlockMethod · 0.80
LengthInSamplesMethod · 0.80
sizeMethod · 0.80
ReadMethod · 0.45

Tested by

no test coverage detected