MCPcopy Create free account
hub / github.com/doldecomp/mkdd / findOscPtr

Function findOscPtr

libs/JSystem/JAudio/System/JASBNKParser.cpp:202–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 }
201
202 JASOscillator::Data *findOscPtr(JASBasicBank *pBank, const THeader *pHeader, const TOsc *pOsc)
203 {
204 const TBank *bankp = &pHeader->bank;
205
206 for (u32 i = 0; i < MAX_INST; i++)
207 {
208 TInst *instp = bankp->instOffsets[i].ptr(pHeader);
209 if (instp == NULL)
210 continue;
211
212 for (int j = 0; j < MAX_OSC; j++)
213 {
214 if (instp->oscOffsets[j].ptr(pHeader) != pOsc)
215 continue;
216
217 JASInst *bankInst = pBank->getInst(i);
218 if (bankInst == NULL)
219 continue;
220
221 JASInstParam instParam;
222 bankInst->getParam(60, 127, &instParam);
223 if (j < instParam._20)
224 {
225 return instParam._1c[j];
226 }
227 }
228 }
229 return NULL;
230 }
231
232 const JASOscillator::Point *getOscTableEndPtr(const JASOscillator::Point *pPoint)
233 {

Callers 1

createBasicBankFunction · 0.85

Calls 3

getInstMethod · 0.80
ptrMethod · 0.45
getParamMethod · 0.45

Tested by

no test coverage detected