aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vst/src
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-08-24 02:44:38 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-08-24 02:44:38 +0000
commit7c56622ace1da1d3fe73c10049d6642631a60e80 (patch)
tree4699578d641abdf4466f47a024a4173e2dde3513 /externals/grill/vst/src
parent02a91a1c1287fea5932bde76ceaece20cb69d1e1 (diff)
""
svn path=/trunk/; revision=1973
Diffstat (limited to 'externals/grill/vst/src')
-rw-r--r--externals/grill/vst/src/main.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/externals/grill/vst/src/main.cpp b/externals/grill/vst/src/main.cpp
index 13205a4d..00804e53 100644
--- a/externals/grill/vst/src/main.cpp
+++ b/externals/grill/vst/src/main.cpp
@@ -19,7 +19,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <string>
-#define VST_VERSION "0.1.0pre13"
+#define VST_VERSION "0.1.0pre14"
class vst:
@@ -473,8 +473,27 @@ V vst::m_signal(I n,R *const *insigs,R *const *outsigs)
int i,mx = CntInSig();
if(mx > CntOutSig()) mx = CntOutSig();
- for(i = 0; i < mx; ++i)
- CopySamples(outsigs[i],insigs[i],n);
+ if(mx == 1) {
+ CopySamples(outsigs[0],insigs[0],n);
+ i = 1;
+ }
+ else if(mx == 2) {
+ R *o1 = outsigs[0],*o2 = outsigs[1];
+ const R *i1 = insigs[0],*i2 = insigs[1];
+ for(int s = 0; s < n; ++s) {
+ const R f = *(i1++);
+ *(o2++) = *(i2++);
+ *(o1++) = f;
+ }
+ i = 2;
+ }
+ else
+ for(i = 0; i < mx; ++i) {
+ // must copy via temporary buffer as ordering of output signals can collide with input signals
+ CopySamples(tmpin[i],insigs[i],n);
+ CopySamples(outsigs[i],tmpin[i],n);
+ }
+
for(; i < CntOutSig(); ++i)
ZeroSamples(outsigs[i],n);
}