• From: Matthew van Eerde <Matthew.van.Eerde@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 12 May 2011 06:51:00 +0000

For completeness I will note:

In Windows Vista and up it is possible to gather some information about the 
volume taper via public APIs:

1) call IAudioEndpointVolume::GetVolumeRange to get the min/max/stepping values 
(e.g., -45 dB to 0 dB in steps of 1.5 dB)

2) set each stepping value in turn via 
IAudioEndpointVolume::SetMasterVolumeLevel (e.g., -45 dB, -43.5 dB, -42 dB, 
..., -1.5 dB, 0 dB)

3) query IAudioEndpointVolume::GetMasterVolumeLevelScalar after setting each 
stepping value to see what scalar value corresponds. (0, ..., 1)

4) plot the pairs of points and notice the resulting curve; it is indeed a 
taper and not "linear in dB"

The XP RTM volume taper is "linear in magnitude", and XP SP2's volume taper 
("linear in dB"-ish) is stored in the registry, as documented in this 



"In Windows XP with SP2 or SP3, the registry location of the volume control 
table is the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\Audio\

VolumeControl key."

Since this is a driver developer alias, I reiterate that the primary 
responsibility of the audio driver is to faithfully implement the 
KSPROPERTY_AUDIO_VOLUMELEVEL property.  Expose min, max, and stepping values 
that accurately reflect the capability of the device.  When a "set" request 
comes in, the expectation is that the effect on the signal of an X dB volume 
setting should actually be X dB, for all supported values of X.

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Robert Bielik
Sent: Saturday, April 23, 2011 1:04 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Setting KSPROPERTY_AUDIO_VOLUMELEVEL

Thanks for the info guys, I know then that I have to "bake my own".

Best regards,


Larry Osterman skrev 2011-04-23 07:08:

> To pile onto Frank's comment, the taper algorithm for XP RTM, XP SP2 and Win7 
> are all different (I don't remember if Vista and Win7 have different tapers).


> The IAudioEndpointVolume::SetMasterVolumeLeveldB API is guaranteed to *not* 
> apply a taper; it's the only API (other than directly setting 
> KSPROPERTY_AUDIO_VOLUMELEVEL directly) which is guaranteed not to apply a 
> taper.  And of course that assumes that the audio driver isn't applying its 
> own taper (unfortunately we've found external drivers which do that).



> Larry


> -----Original Message-----

> From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Frank Yerrace

> Sent: Friday, April 22, 2011 3:54 PM

> To: wdmaudiodev@xxxxxxxxxxxxx

> Subject: [wdmaudiodev] Re: Setting KSPROPERTY_AUDIO_VOLUMELEVEL


> Since the "feel" of a taper is a somewhat subjective thing, and there's 
> possibility of tweaks/adjustments/improvements in this in different releases 
> of Windows, the taper function is not documented. Otherwise apps might start 
> taking dependencies on it and eventually cause compatibility challenges.


> Frank Yerrace

> Microsoft Corporation



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



PNG image

Other related posts: