diff options
Diffstat (limited to 'src/pcm/pcm_adpcm.c')
-rw-r--r-- | src/pcm/pcm_adpcm.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/pcm/pcm_adpcm.c b/src/pcm/pcm_adpcm.c index 7347ce60..92a3d53b 100644 --- a/src/pcm/pcm_adpcm.c +++ b/src/pcm/pcm_adpcm.c @@ -602,26 +602,27 @@ int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, char *name, snd_pcm_t *spcm; snd_pcm_format_t sformat = SND_PCM_FORMAT_UNKNOWN; snd_config_foreach(i, conf) { - snd_config_t *n = snd_config_entry(i); - if (strcmp(n->id, "comment") == 0) + snd_config_t *n = snd_config_iterator_entry(i); + const char *id = snd_config_get_id(n); + if (strcmp(id, "comment") == 0) continue; - if (strcmp(n->id, "type") == 0) + if (strcmp(id, "type") == 0) continue; - if (strcmp(n->id, "stream") == 0) + if (strcmp(id, "stream") == 0) continue; - if (strcmp(n->id, "sname") == 0) { - err = snd_config_string_get(n, &sname); + if (strcmp(id, "sname") == 0) { + err = snd_config_get_string(n, &sname); if (err < 0) { - ERR("Invalid type for %s", n->id); + ERR("Invalid type for %s", id); return -EINVAL; } continue; } - if (strcmp(n->id, "sformat") == 0) { + if (strcmp(id, "sformat") == 0) { const char *f; - err = snd_config_string_get(n, &f); + err = snd_config_get_string(n, &f); if (err < 0) { - ERR("Invalid type for %s", n->id); + ERR("Invalid type for %s", id); return -EINVAL; } sformat = snd_pcm_format_value(f); @@ -636,7 +637,7 @@ int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, char *name, } continue; } - ERR("Unknown field %s", n->id); + ERR("Unknown field %s", id); return -EINVAL; } if (!sname) { |