Splitted rawmidi streams. Removed stream constraint on config files

This commit is contained in:
Abramo Bagnara 2001-02-07 13:30:40 +00:00
parent 3e091c8822
commit 66f13f6115
21 changed files with 142 additions and 233 deletions

View file

@ -595,25 +595,6 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
ERR("Invalid type for PCM %s definition", name);
return -EINVAL;
}
err = snd_config_search(pcm_conf, "stream", &conf);
if (err >= 0) {
const char *id = snd_config_get_id(conf);
err = snd_config_get_string(conf, &str);
if (err < 0) {
ERR("Invalid type for %s", id);
return err;
}
if (strcmp(str, "playback") == 0) {
if (stream != SND_PCM_STREAM_PLAYBACK)
return -EINVAL;
} else if (strcmp(str, "capture") == 0) {
if (stream != SND_PCM_STREAM_CAPTURE)
return -EINVAL;
} else {
ERR("Invalid value for %s", id);
return -EINVAL;
}
}
err = snd_config_search(pcm_conf, "type", &conf);
if (err < 0) {
ERR("type is not defined");

View file

@ -608,8 +608,6 @@ int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -481,8 +481,6 @@ int _snd_pcm_alaw_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -238,8 +238,6 @@ int _snd_pcm_copy_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -477,8 +477,6 @@ int _snd_pcm_file_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -687,8 +687,6 @@ int _snd_pcm_hw_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "card") == 0) {
err = snd_config_get_integer(n, &card);
if (err < 0) {

View file

@ -379,8 +379,6 @@ int _snd_pcm_linear_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -496,8 +496,6 @@ int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -603,8 +603,6 @@ int _snd_pcm_multi_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "slave") == 0) {
if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
ERR("Invalid type for %s", id);

View file

@ -382,8 +382,6 @@ int _snd_pcm_null_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
ERR("Unknown field %s", id);
return -EINVAL;
}

View file

@ -718,8 +718,6 @@ int _snd_pcm_plug_open(snd_pcm_t **pcmp, const char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -634,8 +634,6 @@ int _snd_pcm_rate_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -899,8 +899,6 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, char *name,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -1380,8 +1380,6 @@ int _snd_pcm_share_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
if (err < 0) {

View file

@ -736,8 +736,6 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
continue;
if (strcmp(id, "type") == 0)
continue;
if (strcmp(id, "stream") == 0)
continue;
if (strcmp(id, "server") == 0) {
err = snd_config_get_string(n, &server);
if (err < 0) {