debug(1, "Can't get dB value corresponding to a minimum volume "
"+ 1.");
}
- debug(1, "Hardware mixer has dB volume from %f to %f.", (1.0 * alsa_mix_mindb) / 100.0,
+ debug(3, "Hardware mixer has dB volume from %f to %f.", (1.0 * alsa_mix_mindb) / 100.0,
(1.0 * alsa_mix_maxdb) / 100.0);
} else {
// use the linear scale and do the db conversion ourselves
char *version_string = malloc(1024);
if (version_string) {
strcpy(version_string, PACKAGE_VERSION);
+#ifdef CONFIG_LIBDAEMON
+ strcat(version_string, "-libdaemon");
+#endif
#ifdef CONFIG_MBEDTLS
strcat(version_string, "-mbedTLS");
#endif
#ifdef CONFIG_DNS_SD
strcat(version_string, "-dns_sd");
#endif
+#ifdef CONFIG_EXTERNAL_MDNS
+ strcat(version_string, "-external_mdns");
+#endif
#ifdef CONFIG_ALSA
strcat(version_string, "-ALSA");
#endif
// Sample Configuration File for Shairport Sync
// Commented out settings are generally the defaults, except where noted.
+// Some sections are operative only if Shairport Sync has been built with the right configuration flags.
+// See the individual sections for details.
// General Settings
general =
// %h for the hostname,
// %H for the Hostname (i.e. with first letter capitalised (ASCII only)),
// %v for the version number, e.g. 3.0 and
-// %V for the full version string, e.g. 3.0-OpenSSL-Avahi-ALSA-soxr-metadata-sysconfdir:/etc
+// %V for the full version string, e.g. 3.3-OpenSSL-Avahi-ALSA-soxr-metadata-sysconfdir:/etc
// Overall length can not exceed 50 characters. Example: "Shairport Sync %v on %H".
// password = "secret"; // leave this commented out if you don't want to require a password
// interpolation = "basic"; // aka "stuffing". Default is "basic", alternative is "soxr". Use "soxr" only if you have a reasonably fast processor.
+// If you build Shairport Sync with the flag --with-soxr, interpolation will be "soxr" by default.
// output_backend = "alsa"; // Run "shairport-sync -h" to get a list of all output_backends, e.g. "alsa", "pipe", "stdout". The default is the first one.
// mdns_backend = "avahi"; // Run "shairport-sync -h" to get a list of all mdns_backends. The default is the first one.
// port = 5000; // Listen for service requests on this port
// playback_mode = "stereo"; // This can be "stereo", "mono", "reverse stereo", "both left" or "both right". Default is "stereo".
// alac_decoder = "hammerton"; // This can be "hammerton" or "apple". This advanced setting allows you to choose
// the original Shairport decoder by David Hammerton or the Apple Lossless Audio Codec (ALAC) decoder written by Apple.
+// If you build Shairport Sync with the flag --with-apple-alac, the Apple ALAC decoder will be chosen by default.
// interface = "name"; // Use this advanced setting to specify the interface on which Shairport Sync should provide its service. Leave it commented out to get the default, which is to select the interface(s) automatically.
// audio_backend_latency_offset_in_seconds = 0.0; // Set this offset to compensate for a fixed delay in the audio back end. E.g. if the output device delays by 100 ms, set this to -0.1.
// Back End Settings
// These are parameters for the "alsa" audio back end.
+// For this section to be operative, Shairport Sync must be built with the following configuration flag:
+// --with-alsa
alsa =
{
// output_device = "default"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
};
// Parameters for the "sndio" audio back end. All are optional.
+// For this section to be operative, Shairport Sync must be built with the following configuration flag:
+// --with-sndio
sndio =
{
// device = "snd/0"; // optional setting to set the name of the output device. Default is the sndio system default.
};
// Parameters for the "pa" PulseAudio backend.
+// For this section to be operative, Shairport Sync must be built with the following configuration flag:
+// --with-pa
pa =
{
// application_name = "Shairport Sync"; //Set this to the name that should appear in the Sounds "Applications" tab when Shairport Sync is active.
};
// Parameters for the "jack" JACK Audio Connection Kit backend.
+// For this section to be operative, Shairport Sync must be built with the following configuration flag:
+// --with-jack
jack =
{
// client_name = "shairport-sync"; // Set this to the name of the client that should appear in "Connections" when Shairport Sync is active.
};
// Parameters for the "pipe" audio back end, a back end that directs raw CD-style audio output to a pipe. No interpolation is done.
+// For this section to be operative, Shairport Sync must have been built with the following configuration flag:
+// --with-pipe
pipe =
{
// name = "/path/to/pipe"; // there is no default pipe name for the output
};
// There are no configuration file parameters for the "stdout" audio back end. No interpolation is done.
+// To include support for the "stdout" backend, Shairport Sync must be built with the following configuration flag:
+// --with-stdout
// There are no configuration file parameters for the "ao" audio back end. No interpolation is done.
+// To include support for the "ao" backend, Shairport Sync must be built with the following configuration flag:
+// --with-ao
-// Static latency settings are deprecated and the settings have been removed.
-
+// For this section to be operative, Shairport Sync must be built with the following configuration flag:
+// --with-convolution
dsp =
{
};
// How to deal with metadata, including artwork
+// For this section to be operative, Shairport Sync must be built with at one (or more) of the following configuration flags:
+// --with-metadata, --with-dbus-interface, --with-mpris-interface or --with-mqtt-client.
+// In those cases, "enabled" and "include_cover_art" will both be "yes" by default
metadata =
{
// enabled = "no"; // set this to yes to get Shairport Sync to solicit metadata from the source and to pass it on via a pipe
};
// How to enable the MQTT-metadata/remote-service
+// For this section to be operative, Shairport Sync must be built with the following configuration flag:
+// --with-mqtt-client
mqtt =
{
// enabled = "no"; // set this to yes to enable the mqtt-metadata-service
printf(" The default is to set it automatically.\n");
printf(" -S, --stuffing=MODE set how to adjust current latency to match desired latency, "
"where \n");
- printf(" \"basic\" (default) inserts or deletes audio frames from "
+ printf(" \"basic\" inserts or deletes audio frames from "
"packet frames with low processor overhead, and \n");
printf(" \"soxr\" uses libsoxr to minimally resample packet frames -- "
"moderate processor overhead.\n");
printf(" --logOutputLevel log the output level setting -- useful for setting maximum "
"volume.\n");
#ifdef CONFIG_METADATA
+ printf(" -M, --metadata-enable ask for metadata from the source and process it.\n");
printf(" --metadata-pipename=PIPE send metadata to PIPE, e.g. "
"--metadata-pipename=/tmp/shairport-sync-metadata.\n");
printf(" The default is /tmp/shairport-sync-metadata.\n");
printf(" --get-coverart send cover art through the metadata pipe.\n");
#endif
- printf(" -u, --use-stderr log messages through STDERR rather than syslog.\n");
+ printf(" -u, --use-stderr log messages through STDERR rather than syslog.\n");
printf("\n");
mdns_ls_backends();
printf("\n");
{"tolerance", 'z', POPT_ARG_INT, &fTolerance, 0, NULL, NULL},
{"use-stderr", 'u', POPT_ARG_NONE, NULL, 'u', NULL, NULL},
#ifdef CONFIG_METADATA
- {"metadata-pipename", 'M', POPT_ARG_STRING, &config.metadata_pipename, 'M', NULL, NULL},
+ {"metadata-enable", 'M', POPT_ARG_NONE, &config.metadata_enabled, 'M', NULL, NULL},
+ {"metadata-pipename", 0, POPT_ARG_STRING, &config.metadata_pipename, 0, NULL, NULL},
{"get-coverart", 'g', POPT_ARG_NONE, &config.get_coverart, 'g', NULL, NULL},
#endif
POPT_AUTOHELP{NULL, 0, 0, NULL, 0, NULL, NULL}};
#ifdef CONFIG_SOXR
config.packet_stuffing = ST_soxr;
#else
- die("The soxr option not available because this version of shairport-sync was built "
+ warn("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
#ifdef CONFIG_METADATA
/* Get the metadata setting. */
+ config.metadata_enabled = 1; // if metadata support is included, then enable it by default
if (config_lookup_string(config.cfg, "metadata.enabled", &str)) {
if (strcasecmp(str, "no") == 0)
config.metadata_enabled = 0;
die("Invalid metadata enabled option choice \"%s\". It should be \"yes\" or \"no\"");
}
+ config.get_coverart = 1; // if metadata support is included, then enable it by default
if (config_lookup_string(config.cfg, "metadata.include_cover_art", &str)) {
if (strcasecmp(str, "no") == 0)
config.get_coverart = 0;
0.002; // this number of seconds of timing error before attempting to correct it.
config.buffer_start_fill = 220;
config.port = 5000;
+#ifdef CONFIG_SOXR
+ config.packet_stuffing = ST_soxr; // use soxr interpolation by default if support has been included
+#else
config.packet_stuffing = ST_basic; // simple interpolation or deletion
+#endif
// char hostname[100];
// gethostname(hostname, 100);
// config.service_name = malloc(20 + 100);
1 << decoder_hammerton; // David Hammerton's decoder supported by default
#ifdef CONFIG_APPLE_ALAC
config.decoders_supported += 1 << decoder_apple_alac;
+ config.use_apple_decoder = 1; // use the ALAC decoder by default if support has been included
#endif
// initialise random number generator