So I'm in the need to translate a C library to pure java, so far its looking good, but I'm stuck here.
Can someone explain to me what does the following pointer is for?
double *DTimeSigBuf[MAX_TIME_CHANNELS];
Ok I know it is a double type pointer named DTimeSigBuf, but whats that in the brackets? also MAX_TIME_CHANNELS is defined in the h file as:
#define MAX_TIME_CHANNELS 2
then in the code this constant value changes, like its pointing somewhere else, but I dont know what does exactly means. is it equivalent to say:
double *DTimeSigBuf = MAX_TIME_CHANNELS;
if I recall well there was something similar in assembler, like: mov [BX], CL called Indirect addressing mode register, does this have anything to do with this? I know I might be completly lost! because as the title says, I'm a java programmer.
And the other question, what is the effect of doing this:
DTimeSigBuf[chanNum] = (double*)malloc(block_size_samples*sizeof(double));
Where block_size_samples is int and chanNum is an for iterator variable?
Please help! I sware I've been googling the whole time.
Thanks folks :)