wineoss: MOD_MIDIPORT has 0 voices and notes and FFFF ChannelMask.
This commit is contained in:
parent
8aeb9ec03a
commit
d531d229e5
|
@ -217,33 +217,35 @@ static LRESULT OSS_MidiInit(void)
|
||||||
MidiOutDev[i].caps.wPid = 0x0001; /* FIXME Product ID */
|
MidiOutDev[i].caps.wPid = 0x0001; /* FIXME Product ID */
|
||||||
/* Product Version. We simply say "1" */
|
/* Product Version. We simply say "1" */
|
||||||
MidiOutDev[i].caps.vDriverVersion = 0x001;
|
MidiOutDev[i].caps.vDriverVersion = 0x001;
|
||||||
|
/* The following are mandatory for MOD_MIDIPORT */
|
||||||
MidiOutDev[i].caps.wChannelMask = 0xFFFF;
|
MidiOutDev[i].caps.wChannelMask = 0xFFFF;
|
||||||
|
MidiOutDev[i].caps.wVoices = 0;
|
||||||
|
MidiOutDev[i].caps.wNotes = 0;
|
||||||
|
MidiOutDev[i].caps.dwSupport = 0;
|
||||||
|
|
||||||
|
sinfo.device = i;
|
||||||
|
status = ioctl(midiSeqFD, SNDCTL_SYNTH_INFO, &sinfo);
|
||||||
|
if (status == -1) {
|
||||||
|
static const WCHAR fmt[] = {'W','i','n','e',' ','O','S','S',' ','M','i','d','i',' ','O','u','t',' ','#','%','d',' ','d','i','s','a','b','l','e','d',0};
|
||||||
|
ERR("ioctl for synth info failed on %d, disabling it.\n", i);
|
||||||
|
|
||||||
|
wsprintfW(MidiOutDev[i].caps.szPname, fmt, i);
|
||||||
|
|
||||||
|
MidiOutDev[i].caps.wTechnology = MOD_MIDIPORT;
|
||||||
|
MidiOutDev[i].bEnabled = FALSE;
|
||||||
|
} else {
|
||||||
|
MultiByteToWideChar( CP_UNIXCP, 0, sinfo.name, -1,
|
||||||
|
MidiOutDev[i].caps.szPname,
|
||||||
|
sizeof(MidiOutDev[i].caps.szPname)/sizeof(WCHAR) );
|
||||||
|
MidiOutDev[i].caps.wTechnology = MIDI_UnixToWindowsDeviceType(sinfo.synth_type);
|
||||||
|
|
||||||
|
if (MOD_MIDIPORT != MidiOutDev[i].caps.wTechnology) {
|
||||||
/* FIXME Do we have this information?
|
/* FIXME Do we have this information?
|
||||||
* Assuming the soundcards can handle
|
* Assuming the soundcards can handle
|
||||||
* MIDICAPS_VOLUME and MIDICAPS_LRVOLUME but
|
* MIDICAPS_VOLUME and MIDICAPS_LRVOLUME but
|
||||||
* not MIDICAPS_CACHE.
|
* not MIDICAPS_CACHE.
|
||||||
*/
|
*/
|
||||||
MidiOutDev[i].caps.dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
|
MidiOutDev[i].caps.dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
|
||||||
|
|
||||||
sinfo.device = i;
|
|
||||||
status = ioctl(midiSeqFD, SNDCTL_SYNTH_INFO, &sinfo);
|
|
||||||
if (status == -1) {
|
|
||||||
static const WCHAR fmt[] = {'W','i','n','e',' ','O','S','S',' ','M','i','d','i',' ','O','u','t',' ','(','#','%','d',')',' ','d','i','s','a','b','l','e','d',0};
|
|
||||||
ERR("ioctl for synth info failed on %d, disabling it.\n", i);
|
|
||||||
|
|
||||||
wsprintfW(MidiOutDev[i].caps.szPname, fmt, i);
|
|
||||||
|
|
||||||
MidiOutDev[i].caps.wTechnology = MOD_MIDIPORT;
|
|
||||||
MidiOutDev[i].caps.wVoices = 16;
|
|
||||||
MidiOutDev[i].caps.wNotes = 16;
|
|
||||||
MidiOutDev[i].bEnabled = FALSE;
|
|
||||||
} else {
|
|
||||||
MultiByteToWideChar( CP_UNIXCP, 0, sinfo.name, -1,
|
|
||||||
MidiOutDev[i].caps.szPname,
|
|
||||||
sizeof(MidiOutDev[i].caps.szPname)/sizeof(WCHAR) );
|
|
||||||
|
|
||||||
MidiOutDev[i].caps.wTechnology = MIDI_UnixToWindowsDeviceType(sinfo.synth_type);
|
|
||||||
MidiOutDev[i].caps.wVoices = sinfo.nr_voices;
|
MidiOutDev[i].caps.wVoices = sinfo.nr_voices;
|
||||||
|
|
||||||
/* FIXME Is it possible to know the maximum
|
/* FIXME Is it possible to know the maximum
|
||||||
|
@ -252,23 +254,23 @@ static LRESULT OSS_MidiInit(void)
|
||||||
* it's probably equal or more than wVoices
|
* it's probably equal or more than wVoices
|
||||||
*/
|
*/
|
||||||
MidiOutDev[i].caps.wNotes = sinfo.nr_voices;
|
MidiOutDev[i].caps.wNotes = sinfo.nr_voices;
|
||||||
MidiOutDev[i].bEnabled = TRUE;
|
|
||||||
}
|
}
|
||||||
|
MidiOutDev[i].bEnabled = TRUE;
|
||||||
|
|
||||||
/* We also have the information sinfo.synth_subtype, not used here
|
/* We also have the information sinfo.synth_subtype, not used here
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (sinfo.capabilities & SYNTH_CAP_INPUT) {
|
if (sinfo.capabilities & SYNTH_CAP_INPUT) {
|
||||||
FIXME("Synthesizer supports MIDI in. Not yet supported.\n");
|
FIXME("Synthesizer supports MIDI in. Not yet supported.\n");
|
||||||
}
|
}
|
||||||
|
TRACE("SynthOut[%d]\tOSS info: synth type=%d/%d capa=%lx\n",
|
||||||
|
i, sinfo.synth_type, sinfo.synth_subtype, (long)sinfo.capabilities);
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("SynthOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n"
|
TRACE("SynthOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n",
|
||||||
"\tOSS info: synth subtype=%d capa=%lx\n",
|
|
||||||
i, wine_dbgstr_w(MidiOutDev[i].caps.szPname),
|
i, wine_dbgstr_w(MidiOutDev[i].caps.szPname),
|
||||||
MidiOutDev[i].caps.wTechnology,
|
MidiOutDev[i].caps.wTechnology,
|
||||||
MidiOutDev[i].caps.wVoices, MidiOutDev[i].caps.wNotes,
|
MidiOutDev[i].caps.wVoices, MidiOutDev[i].caps.wNotes,
|
||||||
MidiOutDev[i].caps.wChannelMask, MidiOutDev[i].caps.dwSupport,
|
MidiOutDev[i].caps.wChannelMask, MidiOutDev[i].caps.dwSupport);
|
||||||
sinfo.synth_subtype, (long)sinfo.capabilities);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find how many MIDI devices are there in the system */
|
/* find how many MIDI devices are there in the system */
|
||||||
|
@ -309,7 +311,7 @@ static LRESULT OSS_MidiInit(void)
|
||||||
/* Product Version. We simply say "1" */
|
/* Product Version. We simply say "1" */
|
||||||
MidiOutDev[numsynthdevs + i].caps.vDriverVersion = 0x001;
|
MidiOutDev[numsynthdevs + i].caps.vDriverVersion = 0x001;
|
||||||
if (status == -1) {
|
if (status == -1) {
|
||||||
static const WCHAR fmt[] = {'W','i','n','e',' ','O','S','S',' ','M','i','d','i',' ','O','u','t',' ','(','#','%','d',')',' ','d','i','s','a','b','l','e','d',0};
|
static const WCHAR fmt[] = {'W','i','n','e',' ','O','S','S',' ','M','i','d','i',' ','O','u','t',' ','#','%','d',' ','d','i','s','a','b','l','e','d',0};
|
||||||
wsprintfW(MidiOutDev[numsynthdevs + i].caps.szPname, fmt, numsynthdevs + i);
|
wsprintfW(MidiOutDev[numsynthdevs + i].caps.szPname, fmt, numsynthdevs + i);
|
||||||
MidiOutDev[numsynthdevs + i].bEnabled = FALSE;
|
MidiOutDev[numsynthdevs + i].bEnabled = FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -318,15 +320,11 @@ static LRESULT OSS_MidiInit(void)
|
||||||
sizeof(MidiOutDev[numsynthdevs + i].caps.szPname) / sizeof(WCHAR));
|
sizeof(MidiOutDev[numsynthdevs + i].caps.szPname) / sizeof(WCHAR));
|
||||||
MidiOutDev[numsynthdevs + i].bEnabled = TRUE;
|
MidiOutDev[numsynthdevs + i].bEnabled = TRUE;
|
||||||
}
|
}
|
||||||
MidiOutDev[numsynthdevs + i].caps.wTechnology = MOD_MIDIPORT; /* FIXME Is this right? */
|
MidiOutDev[numsynthdevs + i].caps.wTechnology = MOD_MIDIPORT;
|
||||||
/* Does it make any difference? */
|
MidiOutDev[numsynthdevs + i].caps.wVoices = 0;
|
||||||
MidiOutDev[numsynthdevs + i].caps.wVoices = 16;
|
MidiOutDev[numsynthdevs + i].caps.wNotes = 0;
|
||||||
/* Does it make any difference? */
|
|
||||||
MidiOutDev[numsynthdevs + i].caps.wNotes = 16;
|
|
||||||
MidiOutDev[numsynthdevs + i].caps.wChannelMask= 0xFFFF;
|
MidiOutDev[numsynthdevs + i].caps.wChannelMask= 0xFFFF;
|
||||||
|
MidiOutDev[numsynthdevs + i].caps.dwSupport = 0;
|
||||||
/* FIXME Does it make any difference? */
|
|
||||||
MidiOutDev[numsynthdevs + i].caps.dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
|
|
||||||
|
|
||||||
/* This whole part is somewhat obscure to me. I'll keep trying to dig
|
/* This whole part is somewhat obscure to me. I'll keep trying to dig
|
||||||
info about it. If you happen to know, please tell us. The very
|
info about it. If you happen to know, please tell us. The very
|
||||||
|
@ -340,7 +338,7 @@ static LRESULT OSS_MidiInit(void)
|
||||||
/* Product Version. We simply say "1" */
|
/* Product Version. We simply say "1" */
|
||||||
MidiInDev[i].caps.vDriverVersion = 0x001;
|
MidiInDev[i].caps.vDriverVersion = 0x001;
|
||||||
if (status == -1) {
|
if (status == -1) {
|
||||||
static const WCHAR fmt[] = {'W','i','n','e',' ','O','S','S',' ','M','i','d','i',' ','I','n',' ','(','#','%','d',')',' ','d','i','s','a','b','l','e','d',0};
|
static const WCHAR fmt[] = {'W','i','n','e',' ','O','S','S',' ','M','i','d','i',' ','I','n',' ','#','%','d',' ','d','i','s','a','b','l','e','d',0};
|
||||||
wsprintfW(MidiInDev[i].caps.szPname, fmt, numsynthdevs + i);
|
wsprintfW(MidiInDev[i].caps.szPname, fmt, numsynthdevs + i);
|
||||||
MidiInDev[i].state = -1;
|
MidiInDev[i].state = -1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -349,18 +347,17 @@ static LRESULT OSS_MidiInit(void)
|
||||||
sizeof(MidiInDev[i].caps.szPname) / sizeof(WCHAR));
|
sizeof(MidiInDev[i].caps.szPname) / sizeof(WCHAR));
|
||||||
MidiInDev[i].state = 0;
|
MidiInDev[i].state = 0;
|
||||||
}
|
}
|
||||||
/* FIXME : could we get better information than that ? */
|
MidiInDev[i].caps.dwSupport = 0; /* mandatory with MIDIINCAPS */
|
||||||
MidiInDev[i].caps.dwSupport = MIDICAPS_VOLUME|MIDICAPS_LRVOLUME;
|
|
||||||
|
|
||||||
TRACE("MidiOut[%d]\tname='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n"
|
TRACE("OSS info: midi[%d] dev-type=%d capa=%lx\n"
|
||||||
"MidiIn [%d]\tname='%s' support=%d\n"
|
"\tMidiOut[%d] name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d\n"
|
||||||
"\tOSS info: midi dev-type=%d, capa=%lx\n",
|
"\tMidiIn [%d] name='%s' support=%d\n",
|
||||||
i, wine_dbgstr_w(MidiOutDev[numsynthdevs + i].caps.szPname),
|
i, minfo.dev_type, (long)minfo.capabilities,
|
||||||
|
numsynthdevs + i, wine_dbgstr_w(MidiOutDev[numsynthdevs + i].caps.szPname),
|
||||||
MidiOutDev[numsynthdevs + i].caps.wTechnology,
|
MidiOutDev[numsynthdevs + i].caps.wTechnology,
|
||||||
MidiOutDev[numsynthdevs + i].caps.wVoices, MidiOutDev[numsynthdevs + i].caps.wNotes,
|
MidiOutDev[numsynthdevs + i].caps.wVoices, MidiOutDev[numsynthdevs + i].caps.wNotes,
|
||||||
MidiOutDev[numsynthdevs + i].caps.wChannelMask, MidiOutDev[numsynthdevs + i].caps.dwSupport,
|
MidiOutDev[numsynthdevs + i].caps.wChannelMask, MidiOutDev[numsynthdevs + i].caps.dwSupport,
|
||||||
i, wine_dbgstr_w(MidiInDev[i].caps.szPname), MidiInDev[i].caps.dwSupport,
|
i, wine_dbgstr_w(MidiInDev[i].caps.szPname), MidiInDev[i].caps.dwSupport);
|
||||||
minfo.dev_type, (long)minfo.capabilities);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapup:
|
wrapup:
|
||||||
|
|
Loading…
Reference in New Issue