From b5a56b1273c63789e2faa8993bac03b8277dc828 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 28 May 2026 00:17:28 -0400 Subject: [PATCH] chore: initialize samples array to write to later in `render` --- src/command/render.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/command/render.rs b/src/command/render.rs index 359d854..aa3846e 100644 --- a/src/command/render.rs +++ b/src/command/render.rs @@ -287,6 +287,13 @@ pub async fn handle(state: State, interaction: Interaction) { let duration = end - start; tracing::info!(?voice_channel_id, ?start, ?end, ?duration); + let sample_rate = u32::from(state.audio_sample_rate); + + let total_samples = (duration.whole_seconds() as u32 * sample_rate) + + (duration.subsec_microseconds() as u32 * sample_rate / 1_000_000); + + let samples = vec![0; total_samples as usize]; + let mut recordings = state .recording_data_manager