MCPcopy Create free account
hub / github.com/devkitPro/libctru / ndspInitMaster

Function ndspInitMaster

libctru/source/ndsp/ndsp.c:113–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113static void ndspInitMaster(void)
114{
115 memset(&ndspMaster, 0, sizeof(ndspMaster));
116 LightLock_Init(&ndspMaster.lock);
117 ndspMaster.flags = ~0;
118 ndspMaster.masterVol = 1.0f;
119 ndspMaster.outputMode = NDSP_OUTPUT_STEREO;
120 ndspMaster.clippingMode = NDSP_CLIP_SOFT;
121 ndspMaster.outputCount = 2;
122 ndspMaster.surround.depth = 0x7FFF;
123 ndspMaster.surround.rearRatio = 0x8000;
124
125 // Use the output mode set in system settings, if available
126 Result rc = cfguInit();
127 if (R_SUCCEEDED(rc))
128 {
129 u8 outMode;
130 rc = CFGU_GetConfigInfoBlk2(sizeof(outMode), 0x70001, &outMode);
131 if (R_SUCCEEDED(rc))
132 ndspMaster.outputMode = outMode;
133 cfguExit();
134 }
135}
136
137static void ndspUpdateMaster(void)
138{

Callers 1

ndspInitFunction · 0.85

Calls 4

LightLock_InitFunction · 0.85
cfguInitFunction · 0.85
CFGU_GetConfigInfoBlk2Function · 0.85
cfguExitFunction · 0.85

Tested by

no test coverage detected