flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Overclick 10 Jul 2022, 10:23
Hey there
Is it bug or am I stupid? https://docs.microsoft.com/en-us/windows/win32/api/endpointvolume/nf-endpointvolume-iaudioendpointvolume-getvolumerange They says increment works by fixed dB coefficient but it is not. They use some sort of linear factor, logically 1/100% but it is ratio even if wrong formula and all of drivers uses their own implementation to dB but never real dB increment. ------------------------ [out] pflVolumeIncrementdB Pointer to the volume increment. This parameter points to a float variable into which the method writes the volume increment in decibels. This increment remains constant for the lifetime of the IAudioEndpointVolume interface instance. Remarks The volume range from vmin = *pfLevelMinDB to vmax = *pfLevelMaxDB is divided into n uniform intervals of size vinc = *pfVolumeIncrementDB, where n = (vmax – vmin) / vinc. The values vmin, vmax, and vinc are measured in decibels. The client can set the volume level to one of n + 1 discrete values in the range from vmin to vmax. ------------------------- To check it is wrong switch your device to show dB and you will see it is not linear to dB. Each device implement min and max at their own but volume don't use dB at all. pflVolumeIncrementdB is useless or what?
|
||||||||||
![]() |
|
Overclick 10 Jul 2022, 20:05
Quote:
Exactly. You cannot increase it by fixed size of dB as it explained to be. Because each percent have different increment value, never like that: Code: 100% -0dB (if min-max 100dB for example) 50% -50dB 25% -75dB 1% -99dB So why they do that pflVolumeIncrementdB on API? For what, if volume always increase by ratio? Do you know how to force windows to use dB? |
|||
![]() |
|
I 11 Jul 2022, 10:24
|
|||
![]() |
|
Overclick 12 Jul 2022, 06:35
Ok, windows "mapping via tapered curve", I've got it. But it changes nothing to me. Their curve is almost linear to voltage and they decide how it be. That "almost" is my problem. I need to get one of exact values: dB or ratio. Each audio driver provides their own min-max values that is providing totally wrong dB after that. Some drivers provide from negative to positive dB that broke that curve mapping completely. I'm working on develop real Loudness for windows (iso 226:2003) not that rubbish from Microsoft. Do I have any chance to get clear current ratio for my job?
Look at this screen, tapered curve, serious? It is virtual audio driver and volume changes exactly the same to other drivers. That is example of total rubbish on dB values.
|
||||||||||
![]() |
|
Furs 12 Jul 2022, 13:25
In this respect, dB is a relative metric, a ratio. 0 dB means no change, positive means amplification, and negative means the other way around.
Two devices set at 0 dB will not necessarily be equally loud. All it means is that their default loudness is neither amplified nor dimmed. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.