diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-11-07 22:30:04 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-11-07 22:30:04 +0100 |
commit | acdab088cf4971ce2913faaf9eb05f9da628f1be (patch) | |
tree | b43f8551089e978c6714301c586fc3ce68dee01d /src | |
parent | cd6105fe10aa0761f4b0bd107947c81b2a5a2cc9 (diff) |
Dont enumerate audio devices if no audio input is specified
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index c76a491..53d936c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1332,7 +1332,9 @@ int main(int argc, char **argv) { } const Arg &audio_input_arg = args["-a"]; - const std::vector<AudioInput> audio_inputs = get_pulseaudio_inputs(); + std::vector<AudioInput> audio_inputs; + if(!audio_input_arg.values.empty()) + audio_inputs = get_pulseaudio_inputs(); std::vector<MergedAudioInputs> requested_audio_inputs; // Manually check if the audio inputs we give exist. This is only needed for pipewire, not pulseaudio. |