Page 1 of 1

System.ChangeMasterVolumeBy

Posted: Fri Jul 05, 2013 10:00 am
by totya
Hi!

This is small, marginal problem.

I use this settings of volume (down) control: System.ChangeMasterVolumeBy(-10.0, 0)

This is mean, volume changed 10% steps. Okay, if I press vol down key, I see this:

90..80..70..60..49..39..29..19..9..0

This is not pretty, I think 90..80..70..60..50..40..30..20..10..0 is the desirable...

Thanks!

Re: System.ChangeMasterVolumeBy

Posted: Fri Jul 05, 2013 3:48 pm
by noesis
Are you rounding the volume value or truncating it ?

I don't mean with the setting of the volume, I mean the displaying of it -

if it's truncated then this can happen when using the windows slider to change volume as well i.e. displayed value doesn't match what is set on the windows slider move it up 1 unit it's fine, move it down again it appears to be out of sync by one unit. (In actuality, it's probably out by 0.001 or less). Try this for the value for displaying the volume and see if it makes a difference:

{int(round(eg.result,0))}

Re: System.ChangeMasterVolumeBy - SOLVED!

Posted: Fri Jul 05, 2013 4:47 pm
by totya
noesis wrote:Are you rounding the volume value or truncating it ?

I don't mean with the setting of the volume, I mean the displaying of it -

if it's truncated then this can happen when using the windows slider to change volume as well i.e. displayed value doesn't match what is set on the windows slider move it up 1 unit it's fine, move it down again it appears to be out of sync by one unit. (In actuality, it's probably out by 0.001 or less). Try this for the value for displaying the volume and see if it makes a difference:

{int(round(eg.result,0))}
Hi!

I use this line before (I found this in this forum): {int(eg.result)}%

With round function, problem is solved, thank you!