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

Method initSystem

libs/JSystem/JAudio/System/JASAramStream.cpp:33–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33void JASAramStream::initSystem(u32 block_size, u32 channel_max) {
34#line 66
35 JUT_ASSERT(block_size % 32 == 0);
36 JUT_ASSERT(block_size % 9 == 0);
37 JUT_ASSERT(channel_max > 0 && channel_max <= CHANNEL_MAX);
38 JUT_ASSERT(sReadBuffer == 0);
39
40 if (!JASDriver::registerSubFrameCallback(dvdErrorCheck, NULL)) {
41 JUT_WARNING_F2("%s", "registerSubFrameCallback Failed");
42 return;
43 }
44 if (sLoadThread == NULL) {
45 sLoadThread = JASDvd::getThreadPointer();
46 }
47 sReadBuffer = new (JASDram, 0x20) u8[(block_size + 0x20) * channel_max];
48 JUT_ASSERT(sReadBuffer);
49 sBlockSize = block_size;
50 sChannelMax = channel_max;
51 sSystemPauseFlag = false;
52 sFatalErrorFlag = false;
53}
54
55void JASAramStream::setLoadThread(JASTaskThread *taskThread) {
56 // UNUSED

Callers

nothing calls this directly

Calls 2

registerSubFrameCallbackFunction · 0.85
getThreadPointerFunction · 0.85

Tested by

no test coverage detected