[PATCH 2/2] wineoss: MOD_MIDIPORT has 0 voices and notes and FFFF ChannelMask.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Tue May 4 08:44:05 CDT 2010


Hi,

One corresponding test ist
      ok(!((MIDIMAPPER==udev) ^ (MOD_MAPPER==capsA.wTechnology)),
  "technology %d on device %d\n", capsA.wTechnology, udev);
which I'll activate only after all Wine devices pass it.
-- I've not yet finished writing the similar patch for ALSA.
WineCoreAudio is already correct. (IIRC I sent a patch with
 the same title moons ago).

Furthermore, MSDN says about their SDK's compliance test program:
"If the device reports that it is external (wTechnology field equals
 MOD_MIDIPORT), the wVoices field must equal 0, the wNotes field must
 equal 0, the wChannelMask field must equal 0xFFFF, and the dwSupport
 field must not have the MIDICAPS_VOLUME, MIDICAPS_LRVOLUME, nor the
 MIDICAPS_CACHE flags set."

Present trace() output on test.winehq/winmm:midi shows that native devices
satisfy these conditions.

While I was there, I fixed a buffer overflow when >10 MIDI devices are
present.  caps.szPname[MAXPNAMELEN=32]

As a side effect,
this patch will change the sw-synthesizers Timidity and Fluidsynth to
appear as external ports, not a sw-synth anymore.  This is due to bugs
outside Wine.  Wine receives no flags from the ioctl() calls that
would IMHO allow it to assert the presence of a sw-synth:

trace:midi:ALSA_AddMidiPort MidiOut[0]	name='L"Synth input port (32108:0)"' techn=1 voices=16 notes=16 chnMsk=ffff support=3
	ALSA info: midi dev-type=100002, capa=0 # this is FluidSynth
    SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_APPLICATION
trace:midi:ALSA_AddMidiPort MidiOut[0]	name='L"TiMidity - TiMidity port 0"' techn=1 voices=16 notes=16 chnMsk=ffff support=3
	ALSA info: midi dev-type=2, capa=0
trace:midi:OSS_MidiInit MidiOut[1]	name='L"TiMidity port 0"' techn=1 voices=16 notes=16 chnMsk=ffff support=3
MidiIn [1]	name='L"TiMidity port 0"' support=3
	OSS info: midi dev-type=0, capa=0 # same for FluidSynth
I've not investigated this issue further, least sent bug reports to
either ALSA, FluidSynth or Timidity maintainers.

For comparison:
trace:midi:ALSA_AddMidiPort MidiOut[4]	name='L"Midi Through Port-0"' techn=1 voices=16 notes=16 chnMsk=ffff support=3
	ALSA info: midi dev-type=a0002, capa=0
    SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_SOFTWARE | SND_SEQ_PORT_TYPE_PORT

Regards,
	Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-wineoss-MOD_MIDIPORT-has-0-voices-and-notes-and-FFFF.patch
Type: application/octet-stream
Size: 8728 bytes
Desc: 0004-wineoss-MOD_MIDIPORT-has-0-voices-and-notes-and-FFFF.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100504/888fae0f/attachment.obj>


More information about the wine-patches mailing list