From: Andre Noll Date: Wed, 13 Jan 2010 06:16:32 +0000 (+0100) Subject: alsa: Ignore errors from the btr query. X-Git-Tag: v0.4.2~119 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=c79fd237d54e194626d3b7add4d4ae25bb31eb97 alsa: Ignore errors from the btr query. Just use default values in case samplerate and channels can not be obtained from parent nodes of the buffer tree. --- diff --git a/alsa_write.c b/alsa_write.c index 658183ea..11fc58a4 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -332,17 +332,13 @@ again: pad->channels = conf->channels_arg; if (!conf->samplerate_given) { /* config option trumps btr_exec */ int32_t rate; - ret = get_btr_samplerate(btrn, &rate); - if (ret < 0) - goto err; - pad->samplerate = rate; + if (get_btr_samplerate(btrn, &rate) >= 0) + pad->samplerate = rate; } if (!conf->channels_given) { int32_t ch; - ret = get_btr_channels(btrn, &ch); - if (ret < 0) - goto err; - pad->channels = ch; + if (get_btr_channels(btrn, &ch) >= 0) + pad->channels = ch; } PARA_INFO_LOG("%d channel(s), %dHz\n", pad->channels, pad->samplerate); ret = 1;