| 179 | } |
| 180 | |
| 181 | result TedSid::loadToMem(const char *aFilename) |
| 182 | { |
| 183 | if (!aFilename) |
| 184 | return INVALID_PARAMETER; |
| 185 | MemoryFile *mf = new MemoryFile; |
| 186 | if (!mf) return OUT_OF_MEMORY; |
| 187 | int res = mf->openToMem(aFilename); |
| 188 | if (res != SO_NO_ERROR) |
| 189 | { |
| 190 | delete mf; |
| 191 | return res; |
| 192 | } |
| 193 | res = loadFile(mf); |
| 194 | if (res != SO_NO_ERROR) |
| 195 | { |
| 196 | delete mf; |
| 197 | return res; |
| 198 | } |
| 199 | mFileOwned = true; |
| 200 | return SO_NO_ERROR; |
| 201 | } |
| 202 | |
| 203 | result TedSid::loadFileToMem(File *aFile) |
| 204 | { |