Dont enumerate audio devices if no audio input is specified

This commit is contained in:
dec05eba 2023-11-07 22:30:04 +01:00
parent cd6105fe10
commit acdab088cf

View File

@ -1332,7 +1332,9 @@ int main(int argc, char **argv) {
} }
const Arg &audio_input_arg = args["-a"]; 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; std::vector<MergedAudioInputs> requested_audio_inputs;
// Manually check if the audio inputs we give exist. This is only needed for pipewire, not pulseaudio. // Manually check if the audio inputs we give exist. This is only needed for pipewire, not pulseaudio.