i’m using fmod on my android app to record sound with low level api getRecordPosition,it works just fine on many devices ,but on device vivo x85a,the call of getRecordPosition return FMOD_OK but the position always zero,i tried many times most of time has this problem.any idea?thanks.
do{
...
/*
Determine how much has been recorded since we last checked
*/
unsigned int recordPos = 0;
result = system->**getRecordPosition**(DEVICE_INDEX, &recordPos);
ERRCHECK(result);
if (result != FMOD_OK) {
LOGC("recording break :%s", FMOD_ErrorString(result));
break;
};
unsigned int recordDelta = (recordPos >= lastRecordPos) ? (recordPos - lastRecordPos) : (
recordPos + soundLength - lastRecordPos);
lastRecordPos = recordPos;
samplesRecorded += recordDelta;
if(recordDelta==0)
{
LOGC("zero recordDelta!recordPos:%d",recordPos); // **<-------- always hit**
}
...
}while(true)