Fixed stream info for info ioctl in open()

This commit is contained in:
Jaroslav Kysela 2002-10-22 14:21:49 +00:00
parent 6979732fa5
commit d2095e3a35

View file

@ -242,6 +242,7 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
}
if (subdevice >= 0) {
memset(&info, 0, sizeof(info));
info.stream = outputp ? SNDRV_RAWMIDI_STREAM_OUTPUT : SNDRV_RAWMIDI_STREAM_INPUT;
if (ioctl(fd, SNDRV_RAWMIDI_IOCTL_INFO, &info) < 0) {
SYSERR("SNDRV_RAWMIDI_IOCTL_INFO failed");
ret = -errno;