From c6560bd6cba4292267fd95a675b609459573f075 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Fri, 18 Jul 2025 18:11:28 -0700 Subject: [PATCH] add u8 sample format --- src-tauri/src/audio_toolkit/audio/recorder.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-tauri/src/audio_toolkit/audio/recorder.rs b/src-tauri/src/audio_toolkit/audio/recorder.rs index a0ca572..3ec466d 100644 --- a/src-tauri/src/audio_toolkit/audio/recorder.rs +++ b/src-tauri/src/audio_toolkit/audio/recorder.rs @@ -79,6 +79,10 @@ impl AudioRecorder { ); let stream = match config.sample_format() { + cpal::SampleFormat::U8 => { + AudioRecorder::build_stream::(&thread_device, &config, sample_tx, channels) + .unwrap() + } cpal::SampleFormat::I8 => { AudioRecorder::build_stream::(&thread_device, &config, sample_tx, channels) .unwrap()