More work. Audio driver works enough to play music now.

This commit is contained in:
elasota
2019-12-11 00:51:42 -05:00
parent b1e8e11a56
commit e368cf7235
141 changed files with 8996 additions and 1117 deletions

View File

@@ -11,25 +11,22 @@ namespace PortabilityLayer
class MacFileMem;
struct MMHandleBlock;
struct ResourceCompiledRef;
struct ResourceCompiledTypeList;
class ResTypeID;
class ResourceFile
{
public:
ResourceFile();
~ResourceFile();
bool Load(IOStream *stream);
const ResourceCompiledTypeList *GetResourceTypeList(const ResTypeID &resType);
MMHandleBlock *GetResource(const ResTypeID &resType, int id, bool load);
private:
struct CompiledTypeList
{
ResTypeID m_resType;
ResourceCompiledRef *m_firstRef;
size_t m_numRefs;
};
uint8_t *m_resDataBlob;
size_t m_resDataBlobSize;
@@ -40,14 +37,14 @@ namespace PortabilityLayer
ResourceCompiledRef *m_compiledRefBlob;
size_t m_numResources;
CompiledTypeList *m_compiledTypeListBlob;
ResourceCompiledTypeList *m_compiledTypeListBlob;
size_t m_numResourceTypes;
static bool CompiledRefSortPredicate(const ResourceCompiledRef &a, const ResourceCompiledRef &b);
static bool CompiledTypeListSortPredicate(const CompiledTypeList &a, const CompiledTypeList &b);
static bool CompiledTypeListSortPredicate(const ResourceCompiledTypeList &a, const ResourceCompiledTypeList &b);
static int CompiledRefSearchPredicate(int resID, const ResourceCompiledRef &ref);
static int CompiledTypeListSearchPredicate(const ResTypeID &resTypeID, const CompiledTypeList &typeList);
static int CompiledTypeListSearchPredicate(const ResTypeID &resTypeID, const ResourceCompiledTypeList &typeList);
};
}