Fix track signal indicator sometimes not showing for short samples

Use a latch pattern for trackActive: the audio thread sets it true
whenever a voice is active, and the UI timer atomically reads and
clears it via exchange(false). This eliminates the race where the
flag was cleared at the start of every processBlock, causing the
30Hz timer to miss brief activations from short samples.
This commit is contained in:
Armin 2026-07-20 12:33:36 +02:00
commit 2cded52eef
3 changed files with 3 additions and 5 deletions

View file

@ -57,9 +57,6 @@ void TrommelkisteProcessor::processBlock(juce::AudioBuffer<float>& buffer, juce:
const int numSamples = buffer.getNumSamples();
buffer.clear();
for (int i = 0; i < NUM_TRACKS; ++i)
trackActive[i] = false;
// Shuffle: add ghost notes (bar-quantized)
const float globalShuffleAmt = apvts.getRawParameterValue("global_shuffleAmount")->load();
const float globalGroove = apvts.getRawParameterValue("global_groove")->load();