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

Function ndspUpdateMaster

libctru/source/ndsp/ndsp.c:137–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137static void ndspUpdateMaster(void)
138{
139 DspMasterStatus* m = ndspiGetMasterStatus();
140 LightLock_Lock(&ndspMaster.lock);
141
142 u32 flags = m->flags, mflags = ndspMaster.flags;
143 int i;
144
145 m->headsetConnected = osIsHeadsetConnected();
146 flags |= 0x10000000;
147
148 if (mflags & MFLAG_MASTERVOL)
149 {
150 m->masterVol = ndspMaster.masterVol;
151 flags |= 0x00010000;
152 }
153
154 if (mflags & MFLAG_OUTPUTMODE)
155 {
156 m->outputMode = ndspMaster.outputMode;
157 flags |= 0x04000000;
158 }
159
160 if (mflags & MFLAG_CLIPPINGMODE)
161 {
162 m->clippingMode = ndspMaster.clippingMode;
163 flags |= 0x08000000;
164 }
165
166 if (mflags & MFLAG_OUTPUTCOUNT)
167 {
168 m->outBufCount = ndspMaster.outputCount;
169 flags |= 0x00008000;
170 }
171
172 if (mflags & MFLAG_SYNCMODE)
173 {
174 m->syncMode = ndspMaster.syncMode;
175 m->unknown |= 0x10000; //?
176 }
177
178 if (mflags & MFLAG_SURR_DEPTH)
179 {
180 m->surroundDepth = ndspMaster.surround.depth;
181 flags |= 0x20000000;
182 }
183
184 if (mflags & MFLAG_SURR_POS)
185 {
186 m->surroundSpeakerPos = ndspMaster.surround.pos;
187 flags |= 0x40000000;
188 }
189
190 if (mflags & MFLAG_SURR_RRATIO)
191 {
192 m->rearRatio = ndspMaster.surround.rearRatio;
193 flags |= 0x80000000;
194 }

Callers 3

ndspInitializeFunction · 0.85
ndspThreadMainFunction · 0.85
ndspInitFunction · 0.85

Calls 4

ndspiGetMasterStatusFunction · 0.85
LightLock_LockFunction · 0.85
osIsHeadsetConnectedFunction · 0.85
LightLock_UnlockFunction · 0.85

Tested by

no test coverage detected