add u8 sample format

This commit is contained in:
CJ Pais 2025-07-18 18:11:28 -07:00
parent 6645d57d14
commit c6560bd6cb

View file

@ -79,6 +79,10 @@ impl AudioRecorder {
);
let stream = match config.sample_format() {
cpal::SampleFormat::U8 => {
AudioRecorder::build_stream::<u8>(&thread_device, &config, sample_tx, channels)
.unwrap()
}
cpal::SampleFormat::I8 => {
AudioRecorder::build_stream::<i8>(&thread_device, &config, sample_tx, channels)
.unwrap()