]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Die if soxr option requested but not supported
authorMike Brady <mikebrady@eircom.net>
Sun, 13 Aug 2017 10:28:02 +0000 (11:28 +0100)
committerMike Brady <mikebrady@eircom.net>
Sun, 13 Aug 2017 10:28:02 +0000 (11:28 +0100)
shairport.c

index 53d0fdcd45e0e107d890f8640d376af85b2b3e11..9ea6de90b45c8bd5a4e43040d685195b8b1c237c 100644 (file)
@@ -477,7 +477,12 @@ int parse_options(int argc, char **argv) {
         if (strcasecmp(str, "basic") == 0)
           config.packet_stuffing = ST_basic;
         else if (strcasecmp(str, "soxr") == 0)
-          config.packet_stuffing = ST_soxr;
+#ifdef HAVE_LIBSOXR
+        config.packet_stuffing = ST_soxr;
+#else
+        die("The soxr option not available because this version of shairport-sync was built without libsoxr "
+            "support. Change the \"general/interpolation\" setting in the configuration file.");
+#endif
         else
           die("Invalid interpolation option choice. It should be \"basic\" or \"soxr\"");
       }
@@ -843,8 +848,8 @@ int parse_options(int argc, char **argv) {
 #ifdef HAVE_LIBSOXR
         config.packet_stuffing = ST_soxr;
 #else
-        die("soxr option not available -- this version of shairport-sync was built without libsoxr "
-            "support");
+        die("The soxr option not available because this version of shairport-sync was built without libsoxr "
+            "support. Change the -S option setting.");
 #endif
       else
         die("Illegal stuffing option \"%s\" -- must be \"basic\" or \"soxr\"", stuffing);