[wdmaudiodev] Re: DirectMusic SYNTHCAPS & DMUS_PORTCAPS

  • From: Hock Yiung HUANG <hyhuang@xxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 1 Jun 2006 19:12:55 -0700





An update on this: I traced the calls into the dmusic.dll.

In EnumerateSADDevice(),  the code obtains the device FriendlyName by calling
GetDeviceFriendlyName(). This name is then pass on to !EnumerateSADDevicePin().
EnumerateSADDevicePin() calls the driver (GetFilterCaps) for property 
KSPROPERTY_SYNTH_CAPS to
obtain the SYNTHCAPS value.  It then checks if the device FriendlyName is 
present or not. If it is
present, then the FriendlyName is used. Otherwise, the 
DMUS_PORTCAPS.wszDescription will be zero!!!.
The string in SYNTHCAPS.Description is unused.

Why is this an issue ? For a MIDI filter that expose 1 IN 1 OUT MIDI ports, it 
would not be an
issue. But for a MIDI filter that expose multiple IN & OUT MIDI ports, then it 
became an issue
because the names of the MIDI ports will appear the same in the application, 
making the ports
unidentifiable.

A workaround is to create one MIDI filter for each pair of IN/OUT, and give 
unique names to each of
the filters. However, it means creating custom filter topologies, which doesn't 
work well for a
driver that tries to be  USB-MIDI class-complaint. Plus the same MIDI filter 
with multiple IN & OUT
ports work fine in MME though, with each pin being exposed as a MME device with 
an unique name, so
it is definitely possible for this to work properly if the bug in dmusic.dll is 
resolved.

Can anyone from Microsoft answer this:

 Is there any plan to fix this bug in the next release of DirectX, and will it 
be available to
Windows XP and older OSes ?

Thanks.

-HockYiung

Hock Yiung HUANG/ATC/CLI/Creative wrote on 05/25/2006 02:21:41 PM:

> The DMUS_PORTCAPS structure contains information about a port,
> returned by either by a call to IDirectMusic::EnumPort() or
> IDirectMusicPort::GetCaps().
>
> How does DirectMusic fill in the DMUS_PORTCAPS.wszDescription field
> ? I would thought that the DMUS_PORTCAPS.wszDescription is obtained
> from the SYNTHCAPS.Description field, but from the test program that
> I wrote, it is returning the description of the filter where the pin
> resides.  Anyone else seen this before ?
>
> Any information regarding this will be very much appreciated. Thanks.
>
> -HockYiung
> ForwardSourceID:NT00035616

Other related posts: