Skip to content

Commit

Permalink
add option to disable LMS - release
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Aug 25, 2023
1 parent 149c9d8 commit 1d65bf9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/squeezelite/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static void usage(const char *argv0) {
"Usage: %s [options]\n"
" -s <server>[:<port>]\tConnect to specified server, otherwise uses autodiscovery to find server\n"
#if !EMBEDDED
" NB: use \"-disable\" (no quote) as server to disable LMS connection\n"
" -o <output device>\tSpecify output device, default \"default\", - = output to stdout\n"
" -l \t\t\tList output devices\n"
#endif
Expand Down Expand Up @@ -810,6 +811,12 @@ int squeezelite_main(int argc, char **argv) {
exit(1);
}

#if EMBEDDED
if (server && !strcasecmp(server, "-disable")) {
LOG_ERROR("LMS is disabled");
while (1) sleep(3600);
}
#endif
slimproto(log_slimproto, server, mac, name, namefile, modelname, maxSampleRate);

decode_close();
Expand Down

0 comments on commit 1d65bf9

Please sign in to comment.