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

Function finishDSPFrame

libs/JSystem/JAudio/System/JASAiCtrl.cpp:192–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void finishDSPFrame() {
193 int dacIdx = sDspDacWriteBuffer + 1;
194 if (dacIdx == sDspDacBufferCount) {
195 dacIdx = 0;
196 }
197 if (dacIdx == sDspDacReadBuffer) {
198 sDspStatus = 0;
199 return;
200 }
201 sDspDacWriteBuffer = dacIdx;
202 JASAudioThread::setDSPSyncCount(getSubFrames());
203 JASProbe::start(7, "DSP-MAIN");
204 u32 frameSamples = getFrameSamples();
205 JASDsp::syncFrame(getSubFrames(), (u32)sDspDacBuffer[sDspDacWriteBuffer], (u32)(sDspDacBuffer[sDspDacWriteBuffer] + frameSamples));
206 sDspStatus = 1;
207 updateDSP();
208 if (sDspDacCallback) {
209 (*sDspDacCallback)(sDspDacBuffer[sDspDacWriteBuffer], frameSamples);
210 }
211}
212
213void setSubFrames(u32 frames) { // UNUSED
214 sSubFrames = frames;

Callers 2

updateDacFunction · 0.85
runMethod · 0.85

Calls 4

getSubFramesFunction · 0.85
getFrameSamplesFunction · 0.85
syncFrameFunction · 0.85
updateDSPFunction · 0.85

Tested by

no test coverage detected