Encapsulated hwdep. Converted all enums to type safety

This commit is contained in:
Abramo Bagnara 2001-02-05 15:44:42 +00:00
parent a83b209df2
commit 5bf23ae9a1
32 changed files with 510 additions and 268 deletions

View file

@ -488,7 +488,7 @@ int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, char *name,
char *sname = NULL;
int err;
snd_pcm_t *spcm;
snd_pcm_format_t sformat = SND_PCM_FORMAT_NONE;
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)
@ -513,7 +513,7 @@ int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, char *name,
return -EINVAL;
}
sformat = snd_pcm_format_value(f);
if (sformat == SND_PCM_FORMAT_NONE) {
if (sformat == SND_PCM_FORMAT_UNKNOWN) {
ERR("Unknown sformat");
return -EINVAL;
}
@ -531,7 +531,7 @@ int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, char *name,
ERR("sname is not defined");
return -EINVAL;
}
if (sformat == SND_PCM_FORMAT_NONE) {
if (sformat == SND_PCM_FORMAT_UNKNOWN) {
ERR("sformat is not defined");
return -EINVAL;
}