From 9597f61fc1bbf270965729d533306d10ef3c43ea Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 28 Sep 2015 16:33:01 +0300 Subject: gstreamer: fix audio volume plugin Setting volume is broken on ARM when compiled with GCC 4.9, where anything but max volume (1.0) turns into mute. Patches taken from https://community.freescale.com/thread/350584 Change-Id: I43fe71fdb62bdeed066ec468ffe70f39e950843e Reviewed-by: Yoann Lopes Reviewed-by: Karim Pinter --- .../gstreamer/gst-plugins-base/fix-gstvolume.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch (limited to 'recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch') diff --git a/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch new file mode 100644 index 0000000..d229e95 --- /dev/null +++ b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch @@ -0,0 +1,23 @@ +diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c +index 0f5b362..94d03a3 100644 +--- a/gst/volume/gstvolume.c ++++ b/gst/volume/gstvolume.c +@@ -314,10 +314,14 @@ volume_update_volume (GstVolume * self, gfloat volume, + self->current_mute = FALSE; + self->current_volume = volume; + +- self->current_vol_i8 = volume * VOLUME_UNITY_INT8; +- self->current_vol_i16 = volume * VOLUME_UNITY_INT16; +- self->current_vol_i24 = volume * VOLUME_UNITY_INT24; +- self->current_vol_i32 = volume * VOLUME_UNITY_INT32; ++ self->current_vol_i8 = ++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8); ++ self->current_vol_i16 = ++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16); ++ self->current_vol_i24 = ++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24); ++ self->current_vol_i32 = ++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32); + + passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16); + } -- cgit v1.2.3-54-g00ecf