send playback events from backend to use as time reference

This commit is contained in:
Skyler Lehmkuhl
2025-10-23 04:30:52 -04:00
parent d2fa167179
commit 8be10b8213
3 changed files with 62 additions and 25 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ impl Engine {
command_rx: rtrb::Consumer<Command>,
event_tx: rtrb::Producer<AudioEvent>,
) -> Self {
let event_interval_frames = (sample_rate as usize * channels as usize) / 10; // Update 10 times per second
let event_interval_frames = (sample_rate as usize * channels as usize) / 60; // Update 60 times per second
// Calculate a reasonable buffer size for the pool (typical audio callback size * channels)
let buffer_size = 512 * channels as usize;