[SCM] calf/master: Call get_param_count once and store the result for later.
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:40:08 UTC 2013
The following commit has been merged in the master branch:
commit d5bf220be47b2c74a0236b01f5d2dc988c000190
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Mon May 3 19:37:30 2010 +0100
Call get_param_count once and store the result for later.
diff --git a/src/calf/jackhost.h b/src/calf/jackhost.h
index 5cdd508..a0dd201 100644
--- a/src/calf/jackhost.h
+++ b/src/calf/jackhost.h
@@ -84,7 +84,7 @@ public:
port midi_port;
std::string name;
std::string instance_name;
- int in_count, out_count;
+ int in_count, out_count, param_count;
const plugin_metadata_iface *metadata;
public:
diff --git a/src/jackhost.cpp b/src/jackhost.cpp
index b3cb0b1..104de05 100644
--- a/src/jackhost.cpp
+++ b/src/jackhost.cpp
@@ -55,10 +55,11 @@ jack_host::jack_host(audio_module_iface *_module, const std::string &_name, cons
metadata = module->get_metadata_iface();
in_count = metadata->get_input_count();
out_count = metadata->get_output_count();
+ param_count = metadata->get_param_count();
inputs.resize(in_count);
outputs.resize(out_count);
- param_values = new float[metadata->get_param_count()];
- for (int i = 0; i < metadata->get_param_count(); i++) {
+ param_values = new float[param_count];
+ for (int i = 0; i < param_count; i++) {
params[i] = ¶m_values[i];
}
clear_preset();
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list