[wdmaudiodev] Re: Peak Meter in Core Audio APIs

  • From: "Andrew Mindrin" <wdmaudiodev@xxxxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Mon, 21 Jun 2010 06:44:22 -0400

Clemens Ladisch wrote:

> Can you give an example where it doesn't correspond?

For example, IAudioEndpointVolume::GetVolumeRange returns max=0dB
and min=-96dB. According to your way we never compute -96dB at the
lower range when Current Volume = -96db and Peak Value = 0.5 or
any other.

> So if the current volume is -12 dB, and the peak value is at 0.5,
> the meter would show -6 dB?

If max=0dB and min=-96dB it will show:

min + (Current Volume - min) * Peak Value = -96 + (-12 + 96) * 0.5 = -54 dB

******************

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/

Other related posts: