mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 14:06:14 +02:00
don't show DAC list option if unavailable
This commit is contained in:
parent
24f432acdc
commit
2d89a08691
1 changed files with 5 additions and 1 deletions
|
@ -86,10 +86,12 @@ int main (int argc, char **argv)
|
||||||
OptionParser op("Allowed options");
|
OptionParser op("Allowed options");
|
||||||
op.add(helpSwitch)
|
op.add(helpSwitch)
|
||||||
.add(versionSwitch)
|
.add(versionSwitch)
|
||||||
.add(listSwitch)
|
|
||||||
.add(hostValue)
|
.add(hostValue)
|
||||||
.add(portValue)
|
.add(portValue)
|
||||||
|
#if defined(HAS_ALSA)
|
||||||
|
.add(listSwitch)
|
||||||
.add(soundcardValue)
|
.add(soundcardValue)
|
||||||
|
#endif
|
||||||
#ifdef HAS_DAEMON
|
#ifdef HAS_DAEMON
|
||||||
.add(daemonOption)
|
.add(daemonOption)
|
||||||
#endif
|
#endif
|
||||||
|
@ -157,11 +159,13 @@ int main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
PcmDevice pcmDevice = getPcmDevice(soundcard);
|
PcmDevice pcmDevice = getPcmDevice(soundcard);
|
||||||
|
#if defined(HAS_ALSA)
|
||||||
if (pcmDevice.idx == -1)
|
if (pcmDevice.idx == -1)
|
||||||
{
|
{
|
||||||
cout << "soundcard \"" << soundcard << "\" not found\n";
|
cout << "soundcard \"" << soundcard << "\" not found\n";
|
||||||
// exit(EXIT_FAILURE);
|
// exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (host.empty())
|
if (host.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue