| 450 | } |
| 451 | |
| 452 | void BufferShuffler::UpdateGridControllerLights(bool force) |
| 453 | { |
| 454 | if (mGridControlTarget->GetGridController() == nullptr) |
| 455 | return; |
| 456 | |
| 457 | for (int x = 0; x < mGridControlTarget->GetGridController()->NumCols(); ++x) |
| 458 | { |
| 459 | for (int y = 0; y < mGridControlTarget->GetGridController()->NumRows(); ++y) |
| 460 | { |
| 461 | GridColor color = kGridColorOff; |
| 462 | |
| 463 | int index = x + y * mGridControlTarget->GetGridController()->NumCols(); |
| 464 | int writeSlice = GetWritePositionInSamples(gTime) * GetNumSlices() / GetLengthInSamples(); |
| 465 | int playSlice = mPlaybackSampleIndex * GetNumSlices() / GetLengthInSamples(); |
| 466 | if (index < GetNumSlices()) |
| 467 | { |
| 468 | if (index == mQueuedSlice && mPlaybackSampleStartTime != -1) |
| 469 | color = kGridColor2Dim; |
| 470 | else if (mPlaybackSampleIndex >= 0 && index == playSlice) |
| 471 | color = kGridColor2Bright; |
| 472 | else if (mPlaybackSampleIndex == -1 && index == writeSlice) |
| 473 | color = kGridColor1Bright; |
| 474 | else |
| 475 | color = kGridColor1Dim; |
| 476 | } |
| 477 | |
| 478 | mGridControlTarget->GetGridController()->SetLight(x, y, color, force); |
| 479 | } |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | void BufferShuffler::LoadLayout(const ofxJSONElement& moduleInfo) |
| 484 | { |
nothing calls this directly
no test coverage detected