diff options
author | Max Kellermann <max@duempel.org> | 2009-01-18 19:45:51 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-18 19:45:51 +0100 |
commit | 65f2386b39e88fd1ee5af65336e41ba184d31cf2 (patch) | |
tree | 695c14ea66774fda67000c3babeea770cf8d96bf /src/output/alsa_plugin.c | |
parent | a531a1e65075d27574bc31d4bac7ab20cb750efd (diff) | |
download | mpd-65f2386b39e88fd1ee5af65336e41ba184d31cf2.tar.gz mpd-65f2386b39e88fd1ee5af65336e41ba184d31cf2.tar.xz mpd-65f2386b39e88fd1ee5af65336e41ba184d31cf2.zip |
conf: added config_get_block_unsigned()
Eliminate some more getBlockParam() invocations.
Diffstat (limited to 'src/output/alsa_plugin.c')
-rw-r--r-- | src/output/alsa_plugin.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c index 0dc357ff5..b3520191e 100644 --- a/src/output/alsa_plugin.c +++ b/src/output/alsa_plugin.c @@ -90,16 +90,12 @@ static void freeAlsaData(AlsaData * ad) static void alsa_configure(AlsaData *ad, struct config_param *param) { - struct block_param *bp; - ad->device = config_dup_block_string(param, "device", NULL); 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); + ad->buffer_time = config_get_block_unsigned(param, "buffer_time", 0); + ad->period_time = config_get_block_unsigned(param, "period_time", 0); #ifdef SND_PCM_NO_AUTO_RESAMPLE if (!config_get_block_bool(param, "auto_resample", true)) |