From 72d3b61a4200ee30c2c1743dee259e86694d05e9 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 21 Aug 2022 17:58:46 +0200 Subject: [PATCH] Mention standalone inputs not auto connecting --- src/wrapper/standalone/backend/cpal.rs | 7 +++++++ src/wrapper/standalone/backend/jack.rs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/wrapper/standalone/backend/cpal.rs b/src/wrapper/standalone/backend/cpal.rs index 886896ed..0db26acc 100644 --- a/src/wrapper/standalone/backend/cpal.rs +++ b/src/wrapper/standalone/backend/cpal.rs @@ -132,6 +132,13 @@ impl Cpal { pub fn new(config: WrapperConfig, cpal_host_id: cpal::HostId) -> Result { let host = cpal::host_from_id(cpal_host_id).context("The Audio API is unavailable")?; + if config.input_device.is_none() && P::DEFAULT_INPUT_CHANNELS > 0 { + nih_log!( + "Audio inputs are not connected automatically to prevent feedback. Use the \ + '--input-device' option to choose an input device." + ) + } + // No input device is connected unless requested by the user to avoid feedback loops let input_device = config .input_device diff --git a/src/wrapper/standalone/backend/jack.rs b/src/wrapper/standalone/backend/jack.rs index 5f56571c..d8f63006 100644 --- a/src/wrapper/standalone/backend/jack.rs +++ b/src/wrapper/standalone/backend/jack.rs @@ -184,6 +184,13 @@ impl Jack { anyhow::bail!("The JACK server returned an error: {status:?}"); } + if config.connect_jack_inputs.is_none() && P::DEFAULT_INPUT_CHANNELS > 0 { + nih_log!( + "Audio inputs are not connected automatically to prevent feedback. Use the \ + '--connect-jack-inputs' option to connect the input ports." + ) + } + let mut inputs = Vec::new(); let num_input_channels = config.input_channels.unwrap_or(P::DEFAULT_INPUT_CHANNELS); for port_no in 1..num_input_channels + 1 {