| 1 | #pragma once |
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | #include <prim/seadSafeString.h> |
| 5 | |
| 6 | namespace sead { |
| 7 | class ArchiveRes; |
| 8 | class Heap; |
| 9 | } // namespace sead |
| 10 | |
| 11 | namespace al { |
| 12 | class IAudioResourceLoader; |
| 13 | class Resource; |
| 14 | |
| 15 | bool isExistFile(const sead::SafeString& fileName); |
| 16 | bool isExistDirectory(const sead::SafeString& fileName); |
| 17 | bool isExistArchive(const sead::SafeString& fileName); |
| 18 | bool isExistArchive(const sead::SafeString& fileName, const char* ext); |
| 19 | u32 getFileSize(const sead::SafeString& fileName); |
| 20 | u32 calcFileAlignment(const sead::SafeString& fileName); |
| 21 | u32 calcBufferSizeAlignment(const sead::SafeString& fileName); |
| 22 | u8* loadFile(const sead::SafeString& fileName, s32 size); |
| 23 | bool tryLoadFileToBuffer(const sead::SafeString& fileName, u8*, u32 bufferSize, s32 size); |
| 24 | sead::ArchiveRes* loadArchive(const sead::SafeString& fileName); |
| 25 | sead::ArchiveRes* loadArchiveWithExt(const sead::SafeString& fileName, const char* ext); |
| 26 | bool tryRequestLoadArchive(const sead::SafeString& fileName, sead::Heap* heap); |
| 27 | |
| 28 | // TODO: Replace unknown with a proper name |
| 29 | void loadSoundItem(u32 soundEntryId, u32 unknown, IAudioResourceLoader* resLoader); |
| 30 | |
| 31 | bool tryRequestLoadSoundItem(u32 soundEntryId); |
| 32 | bool tryRequestPreLoadFile(const Resource* res, s32, sead::Heap* heap, |
| 33 | IAudioResourceLoader* resLoader); |
| 34 | bool tryRequestPreLoadFile(const Resource* res, const sead::SafeString& fileName, sead::Heap* heap, |
| 35 | IAudioResourceLoader* resLoader); |
| 36 | void waitLoadDoneAllFile(); |
| 37 | void clearFileLoaderEntry(); |
| 38 | void makeLocalizedArchivePath(sead::BufferedSafeString* outPath, const sead::SafeString& fileName); |
| 39 | void makeLocalizedArchivePathByCountryCode(sead::BufferedSafeString* outPath, |
| 40 | const sead::SafeString& fileName); |
| 41 | void setFileLoaderThreadPriority(s32 priority); |
| 42 | } // namespace al |
| 43 | |