we will add a net chat function in our game. I need two sound instance,one for recording ,another for playing. the frequency of record and play both are 8000hz.
I used the lock and unlock to fetch the record data,and fill the data in the pcmreadcallback.
Recordsound->lock(lastrecordpos , blocklength, &ptr1, &ptr2, &len1, &len2);
Recordsound->unlock(ptr1, ptr2, len1, len2);
FMOD_RESULT F_CALLBACK pcmreadcallback(FMOD_SOUND *sound, void *data, unsigned int datalen)
we trace the size of record data ,it is like"400.400…..8000,400,400…8000",but the size of pcmreadcallback asked is "6400….6400", so I have to cache the enough data for reading ,and it result the time delay. how can I solve the time delay ?
- wangy275 asked 8 years ago
- You must login to post comments