2019-08-25 00:46:40 -04:00
|
|
|
#ifndef _ULTRA64_LIBAUDIO_H_
|
|
|
|
#define _ULTRA64_LIBAUDIO_H_
|
|
|
|
|
|
|
|
#include "abi.h"
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
u8 *offset;
|
|
|
|
s32 len;
|
2023-08-17 08:56:02 -04:00
|
|
|
#if defined(VERSION_SH) || defined(VERSION_CN)
|
2021-07-12 23:17:54 -04:00
|
|
|
s8 medium;
|
|
|
|
s8 magic; // tbl: 0x04, otherwise: 0x03
|
2020-12-03 14:26:38 -05:00
|
|
|
|
|
|
|
// 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 00:46:40 -04:00
|
|
|
} ALSeqData;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2023-08-17 08:56:02 -04:00
|
|
|
#if !defined(VERSION_SH) && !defined(VERSION_CN)
|
2019-08-25 00:46:40 -04:00
|
|
|
s16 revision;
|
2020-12-03 14:26:38 -05:00
|
|
|
#endif
|
2019-08-25 00:46:40 -04:00
|
|
|
s16 seqCount;
|
2023-08-17 08:56:02 -04:00
|
|
|
#if defined(VERSION_SH) || defined(VERSION_CN)
|
2020-12-03 14:26:38 -05:00
|
|
|
s16 unk2;
|
|
|
|
u8 *data;
|
2021-07-12 23:17:54 -04:00
|
|
|
#if !IS_64_BIT
|
2020-12-03 14:26:38 -05:00
|
|
|
s32 pad[2];
|
2021-07-12 23:17:54 -04:00
|
|
|
#endif
|
2020-12-03 14:26:38 -05:00
|
|
|
#endif
|
2019-08-25 00:46:40 -04:00
|
|
|
ALSeqData seqArray[1];
|
|
|
|
} ALSeqFile;
|
|
|
|
|
|
|
|
void alSeqFileNew(ALSeqFile *f, u8 *base);
|
|
|
|
|
|
|
|
#endif
|