#ifndef LOADEDSOUND_H
#define LOADEDSOUND_H

struct XMALOOPREGION
{
    unsigned int LoopStart;
    unsigned int LoopEnd;
    unsigned __int8 LoopSubframeEnd;
    unsigned __int8 LoopSubframeSkip;
};

struct XAUDIOPACKET_ALIGNED
{
    char *pBuffer;
    unsigned int BufferSize;
    unsigned int LoopCount;
    XMALOOPREGION XMALoop[6];
    char *pContext;
};

union $A914CD29B804E77ACE08D070A31DB5AB
{
    unsigned __int8 NumStreams;
    unsigned __int8 ChannelCount;
};

struct XAUDIOXMAFORMAT
{
    unsigned int SampleRate;
    unsigned __int8 ChannelCount;
    unsigned __int8 DecodeBufferSize;
};

union $9C5A25260C9CC66355FE8A35CC8403E0
{
    XAUDIOXMAFORMAT Stream[6];
    unsigned int SampleRate;
};

struct XAUDIOSOURCEFORMAT
{
    unsigned __int8 SampleType;
    $A914CD29B804E77ACE08D070A31DB5AB ___u1;
    $9C5A25260C9CC66355FE8A35CC8403E0 ___u2;
};

struct XaIwXmaDataInfo
{
    int totalMsec;
};

struct XaSeekTable
{
    int size;
    unsigned int *data;
};

struct XaSound
{
    XAUDIOPACKET_ALIGNED packet;
    XAUDIOSOURCEFORMAT format;
    XaIwXmaDataInfo xaIwXmaDataInfo;
    XaSeekTable seekTable;
};

struct LoadedSound
{
    const char *name;
    XaSound sound;
};

#endif // LOADEDSOUND_H
