[Gambas-user] Dbus mpris setting volume needs type d, but how? (Bruce Steers)

Benoit Minisini benoit.minisini at gambas-basic.org
Mon Jan 30 01:15:38 CET 2023


Le 29/01/2023 à 13:08, Bruce Steers a écrit :
> 
> 
> On Sun, 29 Jan 2023 at 08:46, CD <claude.dessere at orange.fr 
> <mailto:claude.dessere at orange.fr>> wrote:
> 
>     Hi,
> 
>     may be this can help :
> 
>     https://gambaswiki.org/wiki/doc/dbus#t10
>     <https://gambaswiki.org/wiki/doc/dbus#t10>
> 
>     regards
> 
> 
> Sadly not , that's info I already know , d is Double in C or Float in 
> gambas.
> But thanks anyway.
> 
> I tried
> Dim f As Float = 0.5
> DBus["session://" & cp.Address]["/org/mpris/MediaPlayer2", 
> "org.mpris.MediaPlayer2.Player"].Volume = f
> Also...
> DBus["session://" & cp.Address]["/org/mpris/MediaPlayer2", 
> "org.mpris.MediaPlayer2.Player"].Volume = CFloat(f)
> 
> It still fails saying I'm using v (Variable) and should use d (Float) type
> 
> Benoit is it a bug or am i missing something?
> 
> Respects
> BruceS
> 

I get this error when setting the 'Volume' property:

org.qtproject.QtDBus.Error.InternalError: Internal error

It's an error that occurs inside the software that implements MPris (I 
tested with firefox playing a youtube video), not inside 'gb.dbus'.

The 'gb.dbus' component knows that the 'Volume' property is a Float ('d' 
DBus signature), and actually correctly sends a 'double' to the DBus API.

So I have no idea what the problem is at the moment.

-- 
Benoît Minisini.



More information about the User mailing list