result Wav::loadMem(unsigned char *aMem, unsigned int aLength, bool aCopy, bool aTakeOwnership) { if (aMem == NULL || aLength == 0) return INVALID_PARAMETER; MemoryFile dr; dr.openMem(aMem, aLength, aCopy, aTakeOwnership); return testAndLoadFile(&dr); }
int Wav::loadMem(unsigned char *aMem, int aLength) { if (aMem == NULL || aLength <= 0) return INVALID_PARAMETER; DataReader dr; dr.open(aMem, aLength); return testAndLoadFile(&dr); }
int Wav::load(const char *aFilename) { DataReader dr; if (!dr.open(aFilename)) { return FILE_NOT_FOUND; } return testAndLoadFile(&dr); }
result Wav::load(const char *aFilename) { DiskFile dr; int res = dr.open(aFilename); if (res != SO_NO_ERROR) { return res; } return testAndLoadFile(&dr); }
result Wav::loadFile(File *aFile) { if (!aFile) return INVALID_PARAMETER; stop(); MemoryFile mr; result res = mr.openFileToMem(aFile); if (res != SO_NO_ERROR) { return res; } return testAndLoadFile(&mr); }
result Wav::loadFile(File *aFile) { return testAndLoadFile(aFile); }