summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-10-25 21:53:23 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-10-25 22:11:43 -0700
commit9f5f0540ee6b0964b545256bab75ac613f2d986b (patch)
treea84747f2fd824c069131bdb34bc404d53bc279fd
parent97290e338c6b6731767f618223f75b7c082e2ae8 (diff)
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 <matt.ranostay@konsulko.com>
-rw-r--r--binding/afm-mediaplayer-binding.c6
1 files 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;