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

Method SampleDropped

Source/Beats.cpp:145–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void Beats::SampleDropped(int x, int y, Sample* sample)
146{
147 assert(sample);
148 int numSamples = sample->LengthInSamples();
149
150 if (numSamples <= 0)
151 return;
152
153 int column = x / BEAT_COLUMN_WIDTH;
154
155 if (column < (int)mBeatColumns.size())
156 mBeatColumns[column]->AddBeat(sample);
157
158 mHighlightColumn = -1;
159}
160
161bool Beats::MouseMoved(float x, float y)
162{

Callers 1

MouseReleasedMethod · 0.45

Calls 3

LengthInSamplesMethod · 0.80
sizeMethod · 0.80
AddBeatMethod · 0.80

Tested by

no test coverage detected