[SCM] jalv/master: Tolerate loading presets with port values that aren't xsd:decimal.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Mon Jun 18 10:52:43 UTC 2012
The following commit has been merged in the master branch:
commit e7d8a4980f263fa2e5190d7a4acdd3aa3cbbde30
Author: Alessio Treglia <alessio at debian.org>
Date: Mon Jun 18 12:43:19 2012 +0200
Tolerate loading presets with port values that aren't xsd:decimal.
Patch taken from upstream trunk.
diff --git a/debian/patches/0001-presets_with_non_decimal_ports.patch b/debian/patches/0001-presets_with_non_decimal_ports.patch
new file mode 100644
index 0000000..6d9f5e4
--- /dev/null
+++ b/debian/patches/0001-presets_with_non_decimal_ports.patch
@@ -0,0 +1,34 @@
+Description: Tolerate loading presets with port values that aren't xsd:decimal
+Origin: http://dev.drobilla.net/changeset/4499
+---
+ src/state.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- jalv.orig/src/state.c
++++ jalv/src/state.c
+@@ -132,14 +132,21 @@ set_port_value(const char* port_symbol,
+ return;
+ }
+
+- if (type != jalv->forge.Float) {
+- fprintf(stderr, "error: Preset port `%s' value is a <%s>, not float\n",
++ float fvalue;
++ if (type == jalv->forge.Float) {
++ fvalue = *(float*)value;
++ } else if (type == jalv->forge.Double) {
++ fvalue = *(double*)value;
++ } else if (type == jalv->forge.Int) {
++ fvalue = *(int32_t*)value;
++ } else if (type == jalv->forge.Long) {
++ fvalue = *(int64_t*)value;
++ } else {
++ fprintf(stderr, "error: Preset `%s' value has bad type <%s>\n",
+ port_symbol, jalv->unmap.unmap(jalv->unmap.handle, type));
+ return;
+ }
+
+- const float fvalue = *(float*)value;
+-
+ // Send value to plugin
+ jalv_ui_write(jalv, port->index, sizeof(fvalue), 0, &fvalue);
+
diff --git a/debian/patches/series b/debian/patches/series
index 611400a..a928ca1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+0001-presets_with_non_decimal_ports.patch
1001-manpages.patch
--
jalv packaging
More information about the pkg-multimedia-commits
mailing list