2019-08-25 06:46:40 +02:00
|
|
|
#ifndef _ULTRA64_LIBAUDIO_H_
|
|
|
|
#define _ULTRA64_LIBAUDIO_H_
|
|
|
|
|
|
|
|
#include "abi.h"
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u8 *offset;
|
|
|
|
s32 len;
|
2022-03-13 09:17:10 +01:00
|
|
|
#ifdef VERSION_SH
|
|
|
|
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203
|
|
|
|
|
|
|
|
// for ctl (else zeros):
|
|
|
|
union {
|
|
|
|
// unused, just for clarification (big endian)
|
|
|
|
struct {
|
|
|
|
u8 bank;
|
|
|
|
u8 ff;
|
|
|
|
u8 numInstruments;
|
|
|
|
u8 numDrums;
|
|
|
|
} as_u8;
|
|
|
|
|
|
|
|
// used
|
|
|
|
struct {
|
|
|
|
s16 bankAndFf;
|
|
|
|
s16 numInstrumentsAndDrums;
|
|
|
|
} as_s16;
|
|
|
|
} ctl;
|
|
|
|
#endif
|
2019-08-25 06:46:40 +02:00
|
|
|
} ALSeqData;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2022-03-13 09:17:10 +01:00
|
|
|
#ifndef VERSION_SH
|
2019-08-25 06:46:40 +02:00
|
|
|
s16 revision;
|
2022-03-13 09:17:10 +01:00
|
|
|
#endif
|
2019-08-25 06:46:40 +02:00
|
|
|
s16 seqCount;
|
2022-03-13 09:17:10 +01:00
|
|
|
#ifdef VERSION_SH
|
|
|
|
s16 unk2;
|
|
|
|
u8 *data;
|
|
|
|
s32 pad[2];
|
|
|
|
#endif
|
2019-08-25 06:46:40 +02:00
|
|
|
ALSeqData seqArray[1];
|
|
|
|
} ALSeqFile;
|
|
|
|
|
|
|
|
void alSeqFileNew(ALSeqFile *f, u8 *base);
|
|
|
|
|
|
|
|
#endif
|