[mpris] [RFC] MPRIS2 Release Candidate

Mirsal Ennaime mirsal.ennaime at gmail.com
Fri Jul 30 20:04:48 CEST 2010


On Fri, Jul 30, 2010 at 7:30 PM, Ian Monroe <ian at monroe.nu> wrote:
> On Fri, Jul 30, 2010 at 12:26 PM, Mirsal Ennaime
> <mirsal.ennaime at gmail.com> wrote:
>> On Fri, Jul 30, 2010 at 7:15 PM, Johannes Sasongko <sasongko at gmail.com> wrote:
>>> Oh, and just throwing an idea out there, would SetVolume(int value) be
>>> preferable to AdjustVolume(int diff)?
>>
>> "Volume" is a read / write property, so there is no need for a SetVolume method.
>> AdjustVolume allows client to avoid a dbus round trip in some cases.
>>
>>> There was also a suggestion (IIRC in the wiki) about using 0.0--1.0
>>> for the volume range, for a bit more accuracy. Personally I don't
>>> think it would be useful, though.
>
> Using a double for volume is more clear though, since then it would
> obviously be 0.0-1.0. Having 101 volume steps is less obvious. Also we
> should error on the side of precision when we can.
>
> Volume_Step is just confusing as an integer. I don't really get it.

Integer volume values (as well as volume steps) are percentages of the
maximum volume.
I have no particular argument for or against either using integers or
floats, so if you see a good reason to switch to floats (and AFAIC
clarity is a good reason) then floats are fine for me.

-- 
Mirsal


More information about the mpris mailing list