| 157 | } |
| 158 | |
| 159 | result TedSid::load(const char *aFilename) |
| 160 | { |
| 161 | if (!aFilename) |
| 162 | return INVALID_PARAMETER; |
| 163 | DiskFile *df = new DiskFile; |
| 164 | if (!df) return OUT_OF_MEMORY; |
| 165 | int res = df->open(aFilename); |
| 166 | if (res != SO_NO_ERROR) |
| 167 | { |
| 168 | delete df; |
| 169 | return res; |
| 170 | } |
| 171 | res = loadFile(df); |
| 172 | if (res != SO_NO_ERROR) |
| 173 | { |
| 174 | delete df; |
| 175 | return res; |
| 176 | } |
| 177 | mFileOwned = true; |
| 178 | return SO_NO_ERROR; |
| 179 | } |
| 180 | |
| 181 | result TedSid::loadToMem(const char *aFilename) |
| 182 | { |