add ping-pong loop mode and crossfade length rotary

This commit is contained in:
Armin 2026-07-24 13:09:52 +02:00
commit e9dc3a4d66
10 changed files with 67 additions and 17 deletions

View file

@ -219,8 +219,9 @@ private:
float noteVelocity{ 0.f };
bool playUntilEnd{ false };
bool isLooping{ false }, loopingHasStart{ false }, loopingHasEnd{ false };
bool isLooping{ false }, loopingHasStart{ false }, loopingHasEnd{ false }, isPingPong{ false };
int sampleStart{ 0 }, sampleEnd{ 0 }, loopStart{ 0 }, loopEnd{ 0 };
float pingPongDirection{ 1.0f };
/** We call this "smoothing" but it's a pretty normal attack/release envelope. */
float attackSmoothing{ 0.f }, releaseSmoothing{ 0.f };