Fixes for pcm_list

This commit is contained in:
Abramo Bagnara 2001-03-08 14:20:00 +00:00
parent c34456d6ba
commit 3031ae4ec7

View file

@ -239,14 +239,16 @@ static void pcm_list(void)
snd_config_t *conf;
snd_output_t *out;
int err = snd_config_update();
if (err < 0)
error("snd_pcm_update: %s", snd_strerror(err));
if (err < 0) {
error("snd_config_update: %s", snd_strerror(err));
return;
}
err = snd_output_stdio_attach(&out, stderr, 0);
assert(err >= 0);
err = snd_config_search(snd_config, "pcm", &conf);
if (err < 0)
return;
fprintf(stderr, "PCM list:");
fprintf(stderr, "PCM list:\n");
snd_config_save(conf, out);
snd_output_close(out);
}