Ticket #1561 (closed defect: fixed)

Opened 3 weeks ago

Last modified 1 week ago

dbus: volume setting issues

Reported by: njh Assigned to: mirsal
Priority: normal Milestone:
Component: Interfaces Version: master
Severity: normal Keywords: dbus
Cc: Platform(s): all
Difficulty: unknown Work status: Not started

Description

Volume setting seems to be suffering from something like a rounding error. My test script is here: http://mpris.rubyforge.org/svn/trunk/examples/volumetest.rb

The column on the left is the value I am trying to set the volume to and the value on that right is the value I am reading back.

flophtaf:trunk njh$ ruby examples/volumetest.rb 
[0, 0]
[1, 0]
[2, 1]
[3, 2]
[4, 3]
[5, 4]
[6, 5]
[7, 6]
[8, 7]
[9, 8]
[10, 9]
[11, 10]
...
...
...
[91, 88]
[92, 89]
[93, 90]
[94, 91]
[95, 92]
[96, 93]
[97, 94]
[98, 95]
[99, 96]
[100, 97]
[101, 98]
[102, 99]
[103, 100]
[104, 100]
[105, 100]

Change History

04/25/08 11:31:15 changed by mirsal

  • owner changed from fkuehne, jb to mirsal.

I'll have a look

04/25/08 20:10:04 changed by mirsal

  • status changed from new to closed.
  • resolution set to wontfix.

VLC is asynchronous (as pointed by funman) though the calls aren't blocking and the changes aren't repercuted immediately.

04/26/08 23:05:46 changed by njh

  • status changed from closed to reopened.
  • resolution deleted.

I have added a 'sleep 2' to the routine and still get the same results.

mpris = Mpris.new

# Test to set and get the playback volume of the media player
for vol_in in 0..150
  mpris.player.volume = vol_in
  sleep 2
  vol_out = mpris.player.volume
  puts "Setting volume to: #{vol_in}, got back: #{vol_out}."
end
Setting volume to: 0, got back: 0.
Setting volume to: 1, got back: 0.
Setting volume to: 2, got back: 1.
Setting volume to: 3, got back: 2.
Setting volume to: 4, got back: 3.
Setting volume to: 5, got back: 4.
Setting volume to: 6, got back: 5.
Setting volume to: 7, got back: 6.
Setting volume to: 8, got back: 7.
Setting volume to: 9, got back: 8.
Setting volume to: 10, got back: 9.

04/28/08 21:55:17 changed by njh

  • keywords set to dbus.

05/06/08 18:16:43 changed by funman

  • status changed from reopened to closed.
  • resolution set to fixed.