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

Method getName

src/core/dataMemoryLevel.cpp:147–169  ·  view source on GitHub ↗

the returned name is the base name belonging to the expanded field n arrIdx will be the index in the array (if an array) or -1 if no array! -> n is element(!) index

Source from the content-addressed store, hash-verified

145// or -1 if no array!
146//-> n is element(!) index
147const char * FrameMetaInfo::getName(int n, int *_arrIdx) const
148{
149 long lN=Ne;
150
151 if ((n>=0)&&(n<lN)) {
152 long f=0,tmp=0;
153
154 for(; f<N; f++) {
155 tmp += field[f].N;
156 if (tmp>n) break;
157 }
158 if (_arrIdx != NULL) {
159 if (field[f].N > 1)
160 *_arrIdx = n-(tmp-field[f].N) + field[f].arrNameOffset;
161 else
162 *_arrIdx = -1;
163 }
164
165 return field[f].name;
166 }
167
168 return NULL;
169}
170
171long FrameMetaInfo::fieldToElementIdx(long _field, long _arrIdx) const
172{

Callers 2

nameMethod · 0.45
getElementNameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected