summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/LV2Node.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-20 01:25:40 +0000
committerDavid Robillard <d@drobilla.net>2007-09-20 01:25:40 +0000
commit99524eb321120773c39ca357396603eb32cffd2c (patch)
treeaca911f6109756b865f8315e27a13e57f6c9b3b4 /src/libs/engine/LV2Node.cpp
parent0a9c38574cafd3e77234d220a18241025098bbb3 (diff)
downloadingen-99524eb321120773c39ca357396603eb32cffd2c.tar.gz
ingen-99524eb321120773c39ca357396603eb32cffd2c.tar.bz2
ingen-99524eb321120773c39ca357396603eb32cffd2c.zip
Strip a bunch of old useless code.
git-svn-id: http://svn.drobilla.net/lad/ingen@735 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/LV2Node.cpp')
-rw-r--r--src/libs/engine/LV2Node.cpp76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 8de8c04a..c8c13f38 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -256,81 +256,5 @@ LV2Node::set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf)
}
-#if 0
-// Based on code stolen from jack-rack
-void
-LV2Node::get_port_vals(ulong port_index, PortInfo* info)
-{
- LV2_Data upper = 0.0f;
- LV2_Data lower = 0.0f;
- LV2_Data normal = 0.0f;
- LV2_PortRangeHintDescriptor hint_descriptor = _descriptor->PortRangeHints[port_index].HintDescriptor;
-
- /* set upper and lower, possibly adjusted to the sample rate */
- if (LV2_IS_HINT_SAMPLE_RATE(hint_descriptor)) {
- upper = _descriptor->PortRangeHints[port_index].UpperBound * _srate;
- lower = _descriptor->PortRangeHints[port_index].LowerBound * _srate;
- } else {
- upper = _descriptor->PortRangeHints[port_index].UpperBound;
- lower = _descriptor->PortRangeHints[port_index].LowerBound;
- }
-
- if (LV2_IS_HINT_LOGARITHMIC(hint_descriptor)) {
- /* FLT_EPSILON is defined as the different between 1.0 and the minimum
- * float greater than 1.0. So, if lower is < FLT_EPSILON, it will be 1.0
- * and the logarithmic control will have a base of 1 and thus not change
- */
- if (lower < FLT_EPSILON) lower = FLT_EPSILON;
- }
-
-
- if (LV2_IS_HINT_HAS_DEFAULT(hint_descriptor)) {
-
- if (LV2_IS_HINT_DEFAULT_MINIMUM(hint_descriptor)) {
- normal = lower;
- } else if (LV2_IS_HINT_DEFAULT_LOW(hint_descriptor)) {
- if (LV2_IS_HINT_LOGARITHMIC(hint_descriptor)) {
- normal = exp(log(lower) * 0.75 + log(upper) * 0.25);
- } else {
- normal = lower * 0.75 + upper * 0.25;
- }
- } else if (LV2_IS_HINT_DEFAULT_MIDDLE(hint_descriptor)) {
- if (LV2_IS_HINT_LOGARITHMIC(hint_descriptor)) {
- normal = exp(log(lower) * 0.5 + log(upper) * 0.5);
- } else {
- normal = lower * 0.5 + upper * 0.5;
- }
- } else if (LV2_IS_HINT_DEFAULT_HIGH(hint_descriptor)) {
- if (LV2_IS_HINT_LOGARITHMIC(hint_descriptor)) {
- normal = exp(log(lower) * 0.25 + log(upper) * 0.75);
- } else {
- normal = lower * 0.25 + upper * 0.75;
- }
- } else if (LV2_IS_HINT_DEFAULT_MAXIMUM(hint_descriptor)) {
- normal = upper;
- } else if (LV2_IS_HINT_DEFAULT_0(hint_descriptor)) {
- normal = 0.0;
- } else if (LV2_IS_HINT_DEFAULT_1(hint_descriptor)) {
- normal = 1.0;
- } else if (LV2_IS_HINT_DEFAULT_100(hint_descriptor)) {
- normal = 100.0;
- } else if (LV2_IS_HINT_DEFAULT_440(hint_descriptor)) {
- normal = 440.0;
- }
- } else { // No default hint
- if (LV2_IS_HINT_BOUNDED_BELOW(hint_descriptor)) {
- normal = lower;
- } else if (LV2_IS_HINT_BOUNDED_ABOVE(hint_descriptor)) {
- normal = upper;
- }
- }
-
- info->min_val(lower);
- info->default_val(normal);
- info->max_val(upper);
-}
-#endif
-
-
} // namespace Ingen