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

Function dspInit

libctru/source/services/dsp.c:26–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26Result dspInit(void)
27{
28 Result ret = 0;
29
30 if (AtomicPostIncrement(&dspRefCount)) return 0;
31
32 ret = srvGetServiceHandle(&dspHandle, "dsp::DSP");
33 if (R_FAILED(ret))
34 {
35 AtomicDecrement(&dspRefCount);
36 return ret;
37 }
38
39 // Force unload component (if exists)
40 dspComponentLoaded = true;
41 DSP_UnloadComponent();
42
43 dspSleeping = false;
44 dspSavedCompBin = NULL;
45 dspSavedCompSize = 0;
46 dspSavedCompProgMask = 0;
47 dspSavedCompDataMask = 0;
48 return 0;
49}
50
51void dspExit(void)
52{

Callers 1

ndspInitFunction · 0.85

Calls 2

srvGetServiceHandleFunction · 0.85
DSP_UnloadComponentFunction · 0.85

Tested by

no test coverage detected