MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / loadMem

Method loadMem

extlibs/soloud/src/audiosource/tedsid/soloud_tedsid.cpp:135–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133 }
134
135 result TedSid::loadMem(unsigned char *aMem, unsigned int aLength, bool aCopy, bool aTakeOwnership)
136 {
137 if (!aMem || aLength == 0)
138 return INVALID_PARAMETER;
139 MemoryFile *mf = new MemoryFile;
140 if (!mf)
141 return OUT_OF_MEMORY;
142 int res = mf->openMem(aMem, aLength, aCopy, aTakeOwnership);
143 if (res != SO_NO_ERROR)
144 {
145 delete mf;
146 return res;
147 }
148 res = loadFile(mf);
149 if (res != SO_NO_ERROR)
150 {
151 delete mf;
152 return res;
153 }
154 mFileOwned = aCopy || aTakeOwnership;
155
156 return SO_NO_ERROR;
157 }
158
159 result TedSid::load(const char *aFilename)
160 {

Callers

nothing calls this directly

Calls 1

openMemMethod · 0.80

Tested by

no test coverage detected