aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs
diff options
context:
space:
mode:
Diffstat (limited to 'src/audioOutputs')
-rw-r--r--src/audioOutputs/audioOutput_alsa.c6
-rw-r--r--src/audioOutputs/audioOutput_shout.c14
2 files changed, 7 insertions, 13 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index 8c8f73b42..f22be742e 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -84,9 +84,9 @@ static int alsa_initDriver(AudioOutput * audioOutput, ConfigParam * param)
BlockParam *bp = getBlockParam(param, "device");
ad->device = bp ? xstrdup(bp->value) : xstrdup("default");
- if ((bp = getBlockParam(param, "use_mmap")) &&
- !strcasecmp(bp->value, "yes"))
- ad->useMmap = 1;
+ ad->useMmap = getBoolBlockParam(param, "use_mmap", 1);
+ if (ad->useMmap == CONF_BOOL_UNSET)
+ ad->useMmap = 0;
if ((bp = getBlockParam(param, "buffer_time")))
ad->buffer_time = atoi(bp->value);
if ((bp = getBlockParam(param, "period_time")))
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index a58ece755..455a635f6 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -124,7 +124,7 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param)
char *user;
char *name;
BlockParam *blockParam;
- unsigned int public = 0;
+ unsigned int public;
sd = newShoutData();
@@ -154,15 +154,9 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param)
checkBlockParam("name");
name = blockParam->value;
- blockParam = getBlockParam(param, "public");
- if (blockParam) {
- if (0 == strcmp(blockParam->value, "yes")) {
- public = 1;
- } else if (strcmp(blockParam->value, "no")) {
- FATAL("public \"%s\" is not \"yes\" or \"no\" at line "
- "%i\n", param->value, param->line);
- }
- }
+ public = getBoolBlockParam(param, "public", 1);
+ if (public == CONF_BOOL_UNSET)
+ public = 0;
blockParam = getBlockParam(param, "user");
if (blockParam)