chiark / gitweb /
Further macro tests
[disorder] / lib / configuration.c
index 869f8957c79f49ff731c303f4dc866ee81385bc2..670eed9b8c914f322064863c93c349564cbf358e 100644 (file)
@@ -957,8 +957,10 @@ static const struct conf conf[] = {
   { C(plugins),          &type_string_accum,     validate_isdir },
   { C(prefsync),         &type_integer,          validate_positive },
   { C(queue_pad),        &type_integer,          validate_positive },
+  { C(replay_min),       &type_integer,          validate_non_negative },
   { C(refresh),          &type_integer,          validate_positive },
   { C(reminder_interval), &type_integer,         validate_positive },
+  { C(remote_userman),   &type_boolean,          validate_any },
   { C2(restrict, restrictions),         &type_restrict,         validate_any },
   { C(sample_format),    &type_sample_format,    validate_sample_format },
   { C(scratch),          &type_string_accum,     validate_isreg },
@@ -1178,6 +1180,7 @@ static struct config *config_default(void) {
   c->sample_format.channels = 2;
   c->sample_format.endian = ENDIAN_NATIVE;
   c->queue_pad = 10;
+  c->replay_min = 8 * 3600;
   c->api = -1;
   c->multicast_ttl = 1;
   c->multicast_loop = 1;
@@ -1277,17 +1280,8 @@ static void config_postdefaults(struct config *c,
       c->api = BACKEND_COMMAND;
     else if(c->broadcast.n)
       c->api = BACKEND_NETWORK;
-    else {
-#if HAVE_ALSA_ASOUNDLIB_H
-      c->api = BACKEND_ALSA;
-#elif HAVE_SYS_SOUNDCARD_H
-      c->api = BACKEND_OSS;
-#elif HAVE_COREAUDIO_AUDIOHARDWARE_H
-      c->api = BACKEND_COREAUDIO;
-#else
-      c->api = BACKEND_COMMAND;
-#endif
-    }
+    else
+      c->api = DEFAULT_BACKEND;
   }
   if(server) {
     if(c->api == BACKEND_COMMAND && !c->speaker_command)