From 9f5f0540ee6b0964b545256bab75ac613f2d986b Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Wed, 25 Oct 2017 21:53:23 -0700 Subject: binding: mediaplayer: fixup double conversion for volume Fix compiler warning of incorrect 'long int' to double conversions that for volume settings Bug-AGL: SPEC-931 Change-Id: I6645506f5636adb589256f101763b5433fc66603 Signed-off-by: Matt Ranostay --- binding/afm-mediaplayer-binding.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c index 2403f83..62ccb5e 100644 --- a/binding/afm-mediaplayer-binding.c +++ b/binding/afm-mediaplayer-binding.c @@ -44,7 +44,7 @@ typedef struct _CustomData { gboolean playing; gboolean loop; gboolean one_time; - guint volume; + long int volume; gint64 position; gint64 duration; } CustomData; @@ -148,7 +148,7 @@ static int set_media_uri(struct playlist_item *item) if (data.playing) gst_element_set_state(data.playbin, GST_STATE_PLAYING); - g_object_set(data.playbin, "volume", data.volume / 100.0, NULL); + g_object_set(data.playbin, "volume", (double) data.volume / 100.0, NULL); return 0; } @@ -382,7 +382,7 @@ static void controls(struct afb_req request) if (volume > 100) volume = 100; - g_object_set(data.playbin, "volume", volume / 100.0, NULL); + g_object_set(data.playbin, "volume", (double) volume / 100.0, NULL); data.volume = volume; -- cgit 1.2.3-korg