I am doing an Windows application using C++. I have the next dude.
I have this function where I receive a void *
with data audio capture:
void Pre_proc_mono::PreProcess(void *data, int lenbytes) {
SLData_t *signal1;
SLData_t *signal2;
SLData_t *result;
signal1 = (SLData_t*)data;
signal2 = new SLData_t[lenbytes];
result = new SLData_t[2 * lenbytes - 1];
for (int i = 0; i < lenbytes; i++){
signal2[i] = signal1[i];
}
}
The loop always fail around 11000, why? What am I doing wrong ? The idea is then do a correlation cross with SigLib library (DSP library). So I need have arrays with limit, not pointers so I am doing this instead. Help?
EDIT: First, when I said fails I want to say that when loop reaches to around 11000 appears and runtime error. Second SLData_t is a kind of date of the SigLib library, and the function to doing correlation cross need this variable as input.