Remove device, stream, subdevice selection and incorporated in info structs

This commit is contained in:
Abramo Bagnara 2000-06-21 15:04:15 +00:00
parent 217417698c
commit 2c3d1a0639

View file

@ -363,7 +363,8 @@ static int soundcard_setup_collect_switches1(int cardno)
}
bzero(pcm, sizeof(struct pcm));
pcm->no = device;
if ((err = snd_ctl_pcm_info(handle, device, &pcm->info)) < 0) {
pcm->info.device = device;
if ((err = snd_ctl_pcm_info(handle, &pcm->info)) < 0) {
snd_ctl_close(handle);
error("PCM info error: %s", snd_strerror(err));
return 1;
@ -393,7 +394,8 @@ static int soundcard_setup_collect_switches1(int cardno)
}
bzero(rawmidi, sizeof(struct rawmidi));
rawmidi->no = device;
if ((err = snd_ctl_rawmidi_info(handle, device, &rawmidi->info)) < 0) {
rawmidi->info.device = device;
if ((err = snd_ctl_rawmidi_info(handle, &rawmidi->info)) < 0) {
snd_ctl_close(handle);
error("RAWMIDI info error: %s", snd_strerror(err));
return 1;