MCPcopy Create free account
hub / github.com/audeering/opensmile / getNextMatrix

Method getNextMatrix

src/core/dataReader.cpp:558–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558cMatrix * cDataReader::getNextMatrix(int privateVec, int readToEnd, int special)
559{
560 if (stepM == 0 || readToEnd == 1) { // read complete input...
561 if (isEOI() && EOIlevelIsMatch()) {
562 // EOIlevelIsMatch: need to query EOI level here to avoid components running before they should in multi-EOI iterations
563 int i;
564 long fl = -1; // fl = length of input
565 for (i=0; i<nLevels; i++) {
566 long tmp = dm->getNAvail(level[i],rdId[i]);
567 if (fl==-1) fl = tmp;
568 else if (tmp < fl) fl = tmp;
569 }
570 if ((curR==0||readToEnd==1)&&(fl > 0)) {
571 /* TODO: curR will not be set correctly be getMatrix for arbitrary reads.. */
572 cMatrix *ret = getMatrix(curR,fl,-1,privateVec);
573 long tmpR = dm->getMinR(level[0]);
574 // printf("avail: %i free: %i\n ",dm->getNAvail(level[0]), dm->getNFree(level[0]));
575 // printf("curW: %i curR(int): %i curR: \n ",dm->getCurW(level[0]),curR);
576 SMILE_IDBG(3,"fullinput: read %i frames (idx %i -> %i).",fl,tmpR,tmpR+fl);
577
578 if (((tmpR > 0)||((myLcfg->growDyn==0)&&(myLcfg->nT < fl)))&&(ret!=NULL)) {
579 if (errorOnFullInputIncomplete) SMILE_IERR(1,"reading of full input is incomplete: read %i frames (idx %i -> %i). start index should be zero! you are having a problem with your buffersizes (%i)!",fl,tmpR,tmpR+fl,myLcfg->nT)
580 else SMILE_IWRN(2,"reading of full input is incomplete: read %i frames (idx %i -> %i). start index should be zero! you are having a problem with your buffersizes (%i)!",fl,tmpR,tmpR+fl,myLcfg->nT)
581 }
582 if (ret != NULL) { curR += fl; }
583 return ret;
584 } else { return NULL; }
585 } else { return NULL; }
586 } else {
587 cMatrix *ret = getMatrix(curR, lengthM, special, privateVec);
588 if (ret != NULL) curR += stepM;
589 return ret;
590 }
591}
592
593long cDataReader::getNAvail()
594{

Callers 9

paSink_playbackCallbackFunction · 0.80
paDuplex_duplexCallbackFunction · 0.80
myTickMethod · 0.80
myTickMethod · 0.80
myTickMethod · 0.80
myTickMethod · 0.80
myTickMethod · 0.80
myTickMethod · 0.80
myTickMethod · 0.80

Calls 2

getNAvailMethod · 0.45
getMinRMethod · 0.45

Tested by

no test coverage detected