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

Method calc

libs/JSystem/JAudio/System/JASAudioReseter.cpp:50–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int JASAudioReseter::calc() {
51 if(_0 == 0) {
52 for(size_t i = 0; i < 64; i++) {
53 JASDSPChannel *handle = JASDSPChannel::getHandle(i);
54 if ((handle->getStatus())==0) {
55 handle->drop();
56 }
57 }
58 if(mThreadStopFlag) {
59 JASAudioThread *pAudioThread = JASGlobalInstance<JASAudioThread>::getInstance();
60#line 78
61 JUT_ASSERT(pAudioThread);
62 pAudioThread->stop();
63 }
64 mDoneFlag = 1;
65 return -1;
66 }
67 _0--;
68 u32 unk = _0;
69 f32 dspLevel = JASDriver::getDSPLevel();
70 JASDriver::setDSPLevel(((float)unk*dspLevel)/(float)(unk+1));
71 return 0;
72}
73
74s32 JASAudioReseter::callback(void *p) {
75 return ((JASAudioReseter*)p)->calc();

Callers 1

callbackMethod · 0.45

Calls 5

getDSPLevelFunction · 0.85
setDSPLevelFunction · 0.85
getStatusMethod · 0.45
dropMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected