mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 02:26:31 +01:00
Fixes for pcm_list
This commit is contained in:
parent
c34456d6ba
commit
3031ae4ec7
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue