0
0

I have a problem to know the length of a table of raw data:

[code:297gn369]

define RECORDRATE 44100

define TPS_RECORD 1

define RECORDLEN RECORDRATE * TPS_RECORD

sample = FSOUND_Sample_Alloc(FSOUND_UNMANAGED, RECORDLEN, FSOUND_MONO | FSOUND_16BITS , RECORDRATE, 255, 128, 255);
//record in sample

void *srcPtr1;
short *raw_data_int;
FSOUND_Sample_Lock(srcSamp, 0, FSOUND_Sample_GetLength(srcSamp), &srcPtr1, &srcPtr2, &srcLen1, &srcLen2);

raw_data_int=(short *)srcPtr1;

for(int i=0;i<RECORDLEN;i++)
{
raw_data_int[i]
....
}
[/code:297gn369]

The loop seems not to traverse raw_data_int completely
RECOLDLEN for loop is correct?

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.