summaryrefslogtreecommitdiff
path: root/src/audio/ring_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/ring_buffer.h')
-rw-r--r--src/audio/ring_buffer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/audio/ring_buffer.h b/src/audio/ring_buffer.h
index d6c41ce..6375161 100644
--- a/src/audio/ring_buffer.h
+++ b/src/audio/ring_buffer.h
@@ -7,10 +7,11 @@
#include <atomic>
#include <cstdint>
-// Ring buffer capacity: 200ms @ 32kHz stereo
-// = 200ms * 32000 samples/sec * 2 channels / 1000ms = 12800 samples
-// This is exactly 25 DCT frames (25 * 512 = 12800)
-#define RING_BUFFER_LOOKAHEAD_MS 200
+// Ring buffer capacity: 400ms @ 32kHz stereo (increased for tempo scaling)
+// = 400ms * 32000 samples/sec * 2 channels / 1000ms = 25600 samples
+// This is exactly 50 DCT frames (50 * 512 = 25600)
+// At 2.0x tempo, we consume content 2x faster, so we need 2x buffer
+#define RING_BUFFER_LOOKAHEAD_MS 400
#define RING_BUFFER_SAMPLE_RATE 32000
#define RING_BUFFER_CHANNELS 2
#define RING_BUFFER_CAPACITY_SAMPLES \