aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/alsa_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/alsa_plugin.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index 0645b34b4..8034169ba 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -95,26 +95,25 @@ alsa_configure(AlsaData *ad, struct config_param *param)
if ((bp = getBlockParam(param, "device")))
ad->device = g_strdup(bp->value);
- ad->useMmap = getBoolBlockParam(param, "use_mmap", 1);
- if (ad->useMmap == CONF_BOOL_UNSET)
- ad->useMmap = 0;
+ ad->useMmap = config_get_block_bool(param, "use_mmap", false);
+
if ((bp = getBlockParam(param, "buffer_time")))
ad->buffer_time = atoi(bp->value);
if ((bp = getBlockParam(param, "period_time")))
ad->period_time = atoi(bp->value);
#ifdef SND_PCM_NO_AUTO_RESAMPLE
- if (!getBoolBlockParam(param, "auto_resample", true))
+ if (!config_get_block_bool(param, "auto_resample", true))
ad->mode |= SND_PCM_NO_AUTO_RESAMPLE;
#endif
#ifdef SND_PCM_NO_AUTO_CHANNELS
- if (!getBoolBlockParam(param, "auto_channels", true))
+ if (!config_get_block_bool(param, "auto_channels", true))
ad->mode |= SND_PCM_NO_AUTO_CHANNELS;
#endif
#ifdef SND_PCM_NO_AUTO_FORMAT
- if (!getBoolBlockParam(param, "auto_format", true))
+ if (!config_get_block_bool(param, "auto_format", true))
ad->mode |= SND_PCM_NO_AUTO_FORMAT;
#endif
}