aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/vector_op.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/vector_op.h b/src/include/vector_op.h
index f8ea8dd..f261ff8 100644
--- a/src/include/vector_op.h
+++ b/src/include/vector_op.h
@@ -1,6 +1,6 @@
/*
Apply a C arithmetical operator to two sample buffers.
- Copyright 2012 David Robillard
+ Copyright 2012-2014 David Robillard
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
@@ -22,21 +22,21 @@
#define VECTOR_OP(op, output, input1, input1_is_cv, input2, input2_is_cv) \
switch ((input1_is_cv << 1) + input2_is_cv) { \
case 0: /* 00 (control * control) */ \
- output[0] = input1[0] * input2[0]; \
+ output[0] = input1[0] op input2[0]; \
break; \
case 1: /* 01 (control * cv) */ \
for (uint32_t s = 0; s < sample_count; ++s) { \
- output[s] = input1[0] * input2[s]; \
+ output[s] = input1[0] op input2[s]; \
} \
break; \
case 2: /* 10 (cv * control) */ \
for (uint32_t s = 0; s < sample_count; ++s) { \
- output[s] = input1[s] * input2[0]; \
+ output[s] = input1[s] op input2[0]; \
} \
break; \
case 3: /* 11 (cv * cv) */ \
for (uint32_t s = 0; s < sample_count; ++s) { \
- output[s] = input1[s] * input2[s]; \
+ output[s] = input1[s] op input2[s]; \
} \
break; \
}