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

Function setFXLine

libs/JSystem/JAudio/System/JASDSPInterface.cpp:207–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207bool setFXLine(u8 p1, s16 *buffer, FxlineConfig_ *config) {
208 Fxline *fxLine = FX_BUF + p1;
209 JAS_CS_START
210 fxLine->_00 = 0;
211 if (config != NULL) {
212 fxLine->_0A = config->_04;
213 fxLine->_08 = SEND_TABLE[config->_02];
214 fxLine->_0E = config->_08;
215 fxLine->_0C = SEND_TABLE[config->_06];
216 fxLine->_02 = config->mBufCount;
217 setFilterTable(fxLine->mFilterTable, config->mFilterTable, 8);
218 }
219 if (buffer != NULL && config != NULL) {
220 u32 bufsize = config->mBufCount * 0xa0;
221 fxLine->_04 = buffer;
222 JASCalc::bzero(buffer, bufsize);
223#line 412
224 JUT_ASSERT((reinterpret_cast<u32>(buffer) & 0x1f) == 0);
225 JUT_ASSERT((bufsize & 0x1f) == 0)
226 DCFlushRange(buffer, bufsize);
227 } else if (config == NULL || buffer != NULL) {
228 fxLine->_04 = buffer;
229 }
230
231 if (fxLine->_04 != NULL) {
232 fxLine->_00 = config->_00;
233 } else {
234 fxLine->_00 = 0;
235 }
236 DCFlushRange(fxLine, sizeof(Fxline));
237 JAS_CS_END
238 return 1;
239}
240
241void changeFXLineParam(u8, u8, u32) {
242 // UNUSED

Callers 2

setMethod · 0.85
initBufferFunction · 0.85

Calls 2

setFilterTableFunction · 0.85
bzeroFunction · 0.85

Tested by

no test coverage detected