diff options
author | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2015-09-28 16:33:01 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2015-09-29 09:42:19 +0000 |
commit | 9597f61fc1bbf270965729d533306d10ef3c43ea (patch) | |
tree | 97e91270c6e2380028fa37236bdc5c126831d743 /recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch | |
parent | 8874262b25488d81bf9ee23f4d425a104f31a7e1 (diff) | |
download | meta-boot2qt-9597f61fc1bbf270965729d533306d10ef3c43ea.tar.gz |
gstreamer: fix audio volume pluginv5.5.1
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 <yoann.lopes@theqtcompany.com>
Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com>
Diffstat (limited to 'recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch')
-rw-r--r-- | recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ | |||
1 | diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c | ||
2 | index 0f5b362..94d03a3 100644 | ||
3 | --- a/gst/volume/gstvolume.c | ||
4 | +++ b/gst/volume/gstvolume.c | ||
5 | @@ -314,10 +314,14 @@ volume_update_volume (GstVolume * self, gfloat volume, | ||
6 | self->current_mute = FALSE; | ||
7 | self->current_volume = volume; | ||
8 | |||
9 | - self->current_vol_i8 = volume * VOLUME_UNITY_INT8; | ||
10 | - self->current_vol_i16 = volume * VOLUME_UNITY_INT16; | ||
11 | - self->current_vol_i24 = volume * VOLUME_UNITY_INT24; | ||
12 | - self->current_vol_i32 = volume * VOLUME_UNITY_INT32; | ||
13 | + self->current_vol_i8 = | ||
14 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8); | ||
15 | + self->current_vol_i16 = | ||
16 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16); | ||
17 | + self->current_vol_i24 = | ||
18 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24); | ||
19 | + self->current_vol_i32 = | ||
20 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32); | ||
21 | |||
22 | passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16); | ||
23 | } | ||