| 173 | } |
| 174 | |
| 175 | void SamplerGrid::InitGrid() |
| 176 | { |
| 177 | delete[] mGridSamples; |
| 178 | mGridSamples = new GridSample[mRows * mCols]; |
| 179 | for (int i = 0; i < mRows * mCols; ++i) |
| 180 | { |
| 181 | mGridSamples[i].mPlayhead = 0; |
| 182 | mGridSamples[i].mHasSample = false; |
| 183 | mGridSamples[i].mSampleLength = 0; |
| 184 | } |
| 185 | |
| 186 | mGrid->SetGrid(mCols, mRows); |
| 187 | } |
| 188 | |
| 189 | void SamplerGrid::GridUpdated(UIGrid* grid, int col, int row, float value, float oldValue) |
| 190 | { |