ladspa: fix unbounded integer properties
authorTim-Philipp Müller <tim@centricular.com>
Wed, 5 Feb 2020 16:03:06 +0000 (16:03 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 6 Feb 2020 10:15:12 +0000 (10:15 +0000)
commitffd3e189de822b42c1ad02d6f9ce625f3c6e467d
treeb99d558ca90e79e6c617789f2fbb801de27e5cf5
parent352bf28a356d263420564a1e425a129053b885da
ladspa: fix unbounded integer properties

Use a double instead of a plain float for intermediary
property values, so we have enough bits to store INT_MAX
and it doesn't get rounded and wrapped to -1 when cast
back to a 32-bit integer.

Fixes criticals like

  g_param_spec_int: assertion 'default_value >= minimum && default_value <= maximum' failed

when loading LADSPA plugins from the Linux Studio Plugins
Project (http://lsp-plug.in) in GStreamer.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1194
ext/ladspa/gstladspautils.c