Audio support nearly complete.

This commit is contained in:
Nicholas Estelami 2022-06-10 13:37:50 -04:00
commit 61760401bc
25 changed files with 1953 additions and 209 deletions

View file

@ -18,11 +18,6 @@
#define _AudiotableSegmentRomStart "Audiotable"
#define _icon_item_gameover_staticSegmentRomStart 0
#define _icon_item_gameover_staticSegmentRomEnd 0
#define _icon_item_staticSegmentRomStart 0
#define _icon_item_staticSegmentRomEnd 0
#define _map_i_staticSegmentRomStart 0

View file

@ -18,6 +18,8 @@
#define AIBUF_LEN 0x580
#define CALC_RESAMPLE_FREQ(sampleRate) (sampleRate / (s32)gAudioContext.audioBufferParameters.frequency)
typedef enum {
/* 0 */ ADSR_STATE_DISABLED,
/* 1 */ ADSR_STATE_INITIAL,
@ -136,6 +138,8 @@ typedef struct
/* 0x04 */ u8* sampleAddr;
/* 0x08 */ AdpcmLoop* loop;
/* 0x0C */ AdpcmBook* book;
u32 sampleRateMagicValue; // For wav samples only...
s32 sampleRate; // For wav samples only...
} SoundFontSample; // size = 0x10
typedef struct {
@ -1062,6 +1066,16 @@ typedef enum {
/* -1 */ OCARINA_NOTE_INVALID = 0xFF
} OcarinaNoteIdx;
typedef struct {
char* seqData;
int32_t seqDataSize;
uint8_t seqNumber;
uint8_t medium;
uint8_t cachePolicy;
int32_t numFonts;
uint8_t fonts[16];
} SequenceData;
#ifdef __cplusplus
extern "C" {
#endif