The code below is storing a pointer of tmpbuffer. How would I store the tmpbuffer itself and not a pointer in an array like fwBuffer and not use malloc / free?
short int *fwBuffer[1000000];
size = sizeof(short int)*length*inchannels;
short int *tmpbuffer = (short int*)malloc(size);
int count = 0;
for (count = 0; count < length*inchannels; count++)
{
tmpbuffer[count] = (short int) (inbuffer[count]);
}
fwBuffer[saveBufferCount] = tmpbuffer;
Are you looking to do something like this? This aggregates all the stored buffers into a single buffer. Note that I do have a separate buffer to store an index; either you may just not need this, or you could in theory pack it into a location in the fwBuffer array.