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