how to match input numSamples in Cplusplus chop?

Hey,

so I’m learning C++ to write a cplusplus chop (in 88).

I’ve compiled the sample code, and even copied, created a new dll using external dll’s (for noise functions). It all works, EXCEPT that my numSamples in output is always 1.

Even in the example, now matter how long my input channels are, the output is always one sample long. Everything I read in the code seems to suggest it should copy the length of the input channels, but that’s not happening. For example the getOutputInfo returning false should cause the output to match the input length, but it doesn’t.

Am I missing something?
It’s weird because I would think the loop - which obviously goes through the number of samples according to the input’s length - would fail somehow (in C - which is the language I knew years ago, you could probably write past the array length but it would cause unpredictable results or crashes, not sure about C++).

So I am not sure what I’m missing…
help?
thanks!
dani

1 Like

Ah, the miracle of asking for info to this forum :slight_smile: - I always find the answer minutes, or even seconds, later… I guess I had to set the CHOP_GeneralInfo->timeSlice to false… leaving this thread here because I find there is a remarkably few postings on writing cplusplus chops… :slight_smile:

1 Like