[wdmaudiodev] IAudioMeterInformation::GetChannelsPeakValues error if driver supports more than 2 channels

  • From: Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 20 Jun 2019 20:24:09 +0200

Trying to understand why Windows 10 does not show peak signal levels
in the endpoint properties window for my driver endpoints, I faced
with the strange behavior.

If the driver supports just two channels for the pin and peak meter
node, all works fine.

If the driver supports more than two channels (for example, 8),
KSPROPERTY_AUDIO_PEAKMETER2 is repeatedly requested for all
filters/channels, but there is no peak display in the window.

Making a small IAudioMeterInformation test, I found that
IAudioMeterInformation::GetMeteringChannelCount returns number of
supported channels properly, then
IAudioMeterInformation::GetChannelsPeakValues sends
KSPROPERTY_AUDIO_PEAKMETER2 to query a peak of each channel, but
always returns E_INVALIDARG.

E_INVALIDARG is returned regardless of number of channels specified in the
call GetChannelsPeakValues. The call succeeds only if I decrease
the number of channels supported by the driver, to two.

Should such behavior be considered a bug, or there are some
non-obvious conditions?

BTW, if I disable KSPROPERTY_AUDIO_PEAKMETER2 support, Audio Engine
issues KSPROPERTY_AUDIO_PEAKMETER requests, and all works fine for any
number of supported channels.


WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


Other related posts: