On 6/18/2010 3:41 AM, Clemens Ladisch wrote: > Andrew Mindrin wrote: > >> How to convert peak values returned by IAudioMeterInformation:: >> GetChannelsPeakValues method to the range of volume levels obtained >> from IAudioEndpointVolume::GetVolumeRange? >> >> I have 2 assumptions: >> >> 1. Current Volume (in dB) * Peak Value >> 2. Current Volume (in dB) - 20 * log10( Peak Value ) >> > Doing the math results in the following: > > 3. current volume (in dB) + 20 * log10( peak value ) > > (To check this: If you output at the full range (peak=1), the current > output level must be the same as the current volume setting; if you > output silence (peak=0), the current output level must be -INF dB.) > I think you are making a connection where none necessarily exists. As far as I am aware, there is no guaranteed mathematical correlation between the volume setting and the raw values produced by the audio card (which is what GetChannelsPeakValues returns). Reducing the volume level will (hopefully) reduce the peak value, but that's the only promise. Volume is a ratio. In many audio devices, maximum volume is 0 dB, meaning there is no attenuation. So, if the peak volume value is 1.0, what does that mean? Running that through your formula, I get 0. Does that mean my sound level is 0 dB? I don't think the units line up here. -- Tim Roberts, timr@xxxxxxxxx Providenza & Boekelheide, Inc. ****************** 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 URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/