Correctly reset frame drawn, shape drawn, and current shape when starting a new frame, fixing the trace function

pull/216/head
James Ball 2024-01-31 16:31:13 +00:00 zatwierdzone przez James H Ball
rodzic 0a956e963a
commit a83cc33a76
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -148,6 +148,9 @@ void ShapeVoice::renderNextBlock(juce::AudioSampleBuffer& outputBuffer, int star
if (!renderingSample && frameDrawn >= drawnFrameLength) {
if (sound.load() != nullptr && currentlyPlaying) {
frameLength = sound.load()->updateFrame(frame);
frameDrawn = 0.0;
shapeDrawn = 0.0;
currentShape = 0;
}
// TODO: updateFrame already iterates over all the shapes,
// so we can improve performance by calculating frameDrawn