From 4ba21ff538805717f12c64f3094139126d951264 Mon Sep 17 00:00:00 2001 From: Qichao Lan Date: Tue, 28 May 2024 10:26:13 +0200 Subject: [PATCH] fix jack clippy --- src/record.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/record.rs b/src/record.rs index 778cf82..8074052 100644 --- a/src/record.rs +++ b/src/record.rs @@ -137,7 +137,7 @@ fn draw_rec_waveform( Ok(()) } -pub fn record_audio(output: String, device: &str, _jack: bool) -> anyhow::Result<()> { +pub fn record_audio(output: String, device: &str, jack: bool) -> anyhow::Result<()> { let output = format!("{}.wav", output.replace(".wav", "")); let (ui_tx, ui_rx) = unbounded(); let (writer_tx, writer_rx) = unbounded(); @@ -173,6 +173,10 @@ pub fn record_audio(output: String, device: &str, _jack: bool) -> anyhow::Result )), not(feature = "jack") ))] + assert!( + !jack, + "jack is only supported on linux, dragonfly, freebsd, and netbsd" + ); let host = cpal::default_host(); let device = if device == "default" {