Fix setting audio test pipeline volume.

Tue, 22 Dec 2020 03:49:19 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 22 Dec 2020 03:49:19 -0600
changeset 40671
bdbfa6925bc9
parent 40670
c4665659625a
child 40672
9375289dfc32

Fix setting audio test pipeline volume.

The element setting goes from 0 to 10, with 1 being full volume and anything
above being overdriven. The widget goes from 0-100, so multiplying by 10 is way
outside the limits.

Testing Done:
Changing the volume bar in the preferences window no longer produces a bunch of overflow warnings.

Reviewed at https://reviews.imfreedom.org/r/309/

pidgin/gtkprefs.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkprefs.c	Tue Dec 22 00:23:48 2020 -0600
+++ b/pidgin/gtkprefs.c	Tue Dec 22 03:49:19 2020 -0600
@@ -2315,7 +2315,7 @@
 
 	volume = gst_bin_get_by_name(GST_BIN(win->vv.voice.pipeline), "volume");
 	g_object_set(volume, "volume",
-	             gtk_scale_button_get_value(GTK_SCALE_BUTTON(w)) * 10.0, NULL);
+	             gtk_scale_button_get_value(GTK_SCALE_BUTTON(w)) / 100.0, NULL);
 }
 
 static gdouble

mercurial