mirror of
https://github.com/HarbourMasters/Starship
synced 2026-08-18 14:12:40 -04:00
In my nightmares, I see audio_synthesis (#146)
* heapsort * suff * load init * split * split data * begone asm * names * names and cleanup * let's try this * woo macros * general * bgm macro * names * audio_thread * Update Torch * I think it's time to move on * Merge remote-tracking branch 'upstream/master' into play --------- Co-authored-by: Alejandro Javier Asenjo Nitti <alejandro.asenjo88@gmail.com>
This commit is contained in:
+382
-271
@@ -1,247 +1,223 @@
|
||||
#ifndef _ABI_H_
|
||||
#define _ABI_H_
|
||||
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1994, Silicon Graphics, Inc. *
|
||||
* *
|
||||
* These coded instructions, statements, and computer programs contain *
|
||||
* unpublished proprietary information of Silicon Graphics, Inc., and *
|
||||
* are protected by Federal copyright law. They may not be disclosed *
|
||||
* to third parties or copied or duplicated in any form, in whole or *
|
||||
* in part, without the prior written consent of Silicon Graphics, Inc. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.32 $
|
||||
* $Date: 1997/02/11 08:16:37 $
|
||||
* $Source: /disk6/Master/cvsmdev2/PR/include/abi.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
/*
|
||||
* Header file for the Audio Binary Interface.
|
||||
* This is included in the Media Binary Interface file
|
||||
* mbi.h.
|
||||
*
|
||||
* This file follows the framework used for graphics.
|
||||
*
|
||||
*/
|
||||
#ifndef ULTRA64_ABI_H
|
||||
#define ULTRA64_ABI_H
|
||||
|
||||
/* Audio commands: */
|
||||
#define A_SPNOOP 0
|
||||
#define A_ADPCM 1
|
||||
#define A_CLEARBUFF 2
|
||||
#define A_ENVMIXER 3
|
||||
#define A_LOADBUFF 4
|
||||
#define A_RESAMPLE 5
|
||||
#define A_SAVEBUFF 6
|
||||
#define A_SEGMENT 7
|
||||
#define A_SETBUFF 8
|
||||
#define A_SETVOL 9
|
||||
#define A_DMEMMOVE 10
|
||||
#define A_LOADADPCM 11
|
||||
#define A_MIXER 12
|
||||
#define A_INTERLEAVE 13
|
||||
#define A_POLEF 14
|
||||
#define A_SETLOOP 15
|
||||
#define A_SPNOOP 0
|
||||
#define A_ADPCM 1
|
||||
#define A_CLEARBUFF 2
|
||||
#define A_UNK3 3
|
||||
#define A_ADDMIXER 4
|
||||
#define A_RESAMPLE 5
|
||||
#define A_RESAMPLE_ZOH 6
|
||||
#define A_FILTER 7
|
||||
#define A_SETBUFF 8
|
||||
// #define A_DUPLICATE 9
|
||||
#define A_DMEMMOVE 10
|
||||
#define A_LOADADPCM 11
|
||||
#define A_MIXER 12
|
||||
#define A_INTERLEAVE 13
|
||||
// #define A_HILOGAIN 14
|
||||
#define A_SETLOOP 15
|
||||
#define A_INTERL 17
|
||||
#define A_ENVSETUP1 18
|
||||
#define A_ENVMIXER 19
|
||||
#define A_LOADBUFF 20
|
||||
#define A_SAVEBUFF 21
|
||||
#define A_ENVSETUP2 22
|
||||
#define A_S8DEC 23
|
||||
#define A_HILOGAIN 24
|
||||
#define A_UNK19 25
|
||||
#define A_DUPLICATE 26
|
||||
|
||||
#define ACMD_SIZE 32
|
||||
|
||||
#define ACMD_SIZE 32
|
||||
/*
|
||||
* Audio flags
|
||||
*/
|
||||
|
||||
#define A_INIT 0x01
|
||||
#define A_CONTINUE 0x00
|
||||
#define A_LOOP 0x02
|
||||
#define A_OUT 0x02
|
||||
#define A_LEFT 0x02
|
||||
#define A_RIGHT 0x00
|
||||
#define A_VOL 0x04
|
||||
#define A_RATE 0x00
|
||||
#define A_AUX 0x08
|
||||
#define A_NOAUX 0x00
|
||||
#define A_MAIN 0x00
|
||||
#define A_MIX 0x10
|
||||
|
||||
/*
|
||||
* BEGIN C-specific section: (typedef's)
|
||||
*/
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
#define A_INIT 0x01
|
||||
#define A_CONTINUE 0x00
|
||||
#define A_LOOP 0x02
|
||||
#define A_OUT 0x02
|
||||
#define A_LEFT 0x02
|
||||
#define A_RIGHT 0x00
|
||||
#define A_VOL 0x04
|
||||
#define A_RATE 0x00
|
||||
#define A_AUX 0x08
|
||||
#define A_NOAUX 0x00
|
||||
#define A_MAIN 0x00
|
||||
#define A_MIX 0x10
|
||||
|
||||
/*
|
||||
* Data Structures.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int gain:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 gain : 16;
|
||||
u32 addr;
|
||||
} Aadpcm;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int gain:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 gain : 16;
|
||||
u32 addr;
|
||||
} Apolef;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int pad1:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 pad1 : 16;
|
||||
u32 addr;
|
||||
} Aenvelope;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:8;
|
||||
unsigned int dmem:16;
|
||||
unsigned int pad2:16;
|
||||
unsigned int count:16;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 8;
|
||||
u32 dmem : 16;
|
||||
u32 pad2 : 16;
|
||||
u32 count : 16;
|
||||
} Aclearbuff;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:8;
|
||||
unsigned int pad2:16;
|
||||
unsigned int inL:16;
|
||||
unsigned int inR:16;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 8;
|
||||
u32 pad2 : 16;
|
||||
u32 inL : 16;
|
||||
u32 inR : 16;
|
||||
} Ainterleave;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:24;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 24;
|
||||
u32 addr;
|
||||
} Aloadbuff;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int pad1:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 pad1 : 16;
|
||||
u32 addr;
|
||||
} Aenvmixer;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int gain:16;
|
||||
unsigned int dmemi:16;
|
||||
unsigned int dmemo:16;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 gain : 16;
|
||||
u32 dmemi : 16;
|
||||
u32 dmemo : 16;
|
||||
} Amixer;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int dmem2:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 dmem2 : 16;
|
||||
u32 addr;
|
||||
} Apan;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int pitch:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 pitch : 16;
|
||||
u32 addr;
|
||||
} Aresample;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int pad1:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 pad1 : 16;
|
||||
u32 addr;
|
||||
} Areverb;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:24;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 24;
|
||||
u32 addr;
|
||||
} Asavebuff;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:24;
|
||||
unsigned int pad2:2;
|
||||
unsigned int number:4;
|
||||
unsigned int base:24;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 24;
|
||||
u32 pad2 : 2;
|
||||
u32 number : 4;
|
||||
u32 base : 24;
|
||||
} Asegment;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int dmemin:16;
|
||||
unsigned int dmemout:16;
|
||||
unsigned int count:16;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 dmemin : 16;
|
||||
u32 dmemout : 16;
|
||||
u32 count : 16;
|
||||
} Asetbuff;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int flags:8;
|
||||
unsigned int vol:16;
|
||||
unsigned int voltgt:16;
|
||||
unsigned int volrate:16;
|
||||
u32 cmd : 8;
|
||||
u32 flags : 8;
|
||||
u32 vol : 16;
|
||||
u32 voltgt : 16;
|
||||
u32 volrate : 16;
|
||||
} Asetvol;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:8;
|
||||
unsigned int dmemin:16;
|
||||
unsigned int dmemout:16;
|
||||
unsigned int count:16;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 8;
|
||||
u32 dmemin : 16;
|
||||
u32 dmemout : 16;
|
||||
u32 count : 16;
|
||||
} Admemmove;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:8;
|
||||
unsigned int count:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 8;
|
||||
u32 count : 16;
|
||||
u32 addr;
|
||||
} Aloadadpcm;
|
||||
|
||||
typedef struct {
|
||||
unsigned int cmd:8;
|
||||
unsigned int pad1:8;
|
||||
unsigned int pad2:16;
|
||||
unsigned int addr;
|
||||
u32 cmd : 8;
|
||||
u32 pad1 : 8;
|
||||
u32 pad2 : 16;
|
||||
u32 addr;
|
||||
} Asetloop;
|
||||
|
||||
|
||||
/*
|
||||
* Generic Acmd Packet
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned int w0;
|
||||
unsigned int w1;
|
||||
u32 w0;
|
||||
u32 w1;
|
||||
} Awords;
|
||||
|
||||
typedef union {
|
||||
Awords words;
|
||||
Aadpcm adpcm;
|
||||
Apolef polef;
|
||||
Aclearbuff clearbuff;
|
||||
Aenvelope envelope;
|
||||
Ainterleave interleave;
|
||||
Aloadbuff loadbuff;
|
||||
Aenvmixer envmixer;
|
||||
Aresample resample;
|
||||
Areverb reverb;
|
||||
Asavebuff savebuff;
|
||||
Asegment segment;
|
||||
Asetbuff setbuff;
|
||||
Asetvol setvol;
|
||||
Admemmove dmemmove;
|
||||
Aloadadpcm loadadpcm;
|
||||
Amixer mixer;
|
||||
Asetloop setloop;
|
||||
long long int force_union_align; /* dummy, force alignment */
|
||||
Awords words;
|
||||
Aadpcm adpcm;
|
||||
Apolef polef;
|
||||
Aclearbuff clearbuff;
|
||||
Aenvelope envelope;
|
||||
Ainterleave interleave;
|
||||
Aloadbuff loadbuff;
|
||||
Aenvmixer envmixer;
|
||||
Aresample resample;
|
||||
Areverb reverb;
|
||||
Asavebuff savebuff;
|
||||
Asegment segment;
|
||||
Asetbuff setbuff;
|
||||
Asetvol setvol;
|
||||
Admemmove dmemmove;
|
||||
Aloadadpcm loadadpcm;
|
||||
Amixer mixer;
|
||||
Asetloop setloop;
|
||||
long long int force_union_align; /* dummy, force alignment */
|
||||
} Acmd;
|
||||
|
||||
/*
|
||||
* ADPCM State
|
||||
*/
|
||||
#define ADPCMVSIZE 8
|
||||
#define ADPCMFSIZE 16
|
||||
#define ADPCMVSIZE 8
|
||||
#define ADPCMFSIZE 16
|
||||
typedef short ADPCM_STATE[ADPCMFSIZE];
|
||||
|
||||
/*
|
||||
@@ -258,7 +234,7 @@ typedef short RESAMPLE_STATE[16];
|
||||
* Resampler constants
|
||||
*/
|
||||
#define UNITY_PITCH 0x8000
|
||||
#define MAX_RATIO 1.99996 /* within .03 cents of +1 octave */
|
||||
#define MAX_RATIO 1.99996 /* within .03 cents of +1 octave */
|
||||
|
||||
/*
|
||||
* Enveloper/Mixer state
|
||||
@@ -269,142 +245,277 @@ typedef short ENVMIX_STATE[40];
|
||||
* Macros to assemble the audio command list
|
||||
*/
|
||||
|
||||
#define aADPCMdec(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
#define aADPCMdec(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (u32)(s); \
|
||||
}
|
||||
|
||||
#define aPoleFilter(pkt, f, g, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(g, 0, 16)); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
#define aPoleFilter(pkt, f, g, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(g, 0, 16)); \
|
||||
_a->words.w1 = (u32)(s); \
|
||||
}
|
||||
|
||||
#define aClearBuffer(pkt, d, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \
|
||||
_a->words.w1 = (unsigned int)(c); \
|
||||
#define aHiLoGain(pkt, gain, count, dmem, a4) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_HILOGAIN, 24, 8) | \
|
||||
_SHIFTL(gain, 16, 8) | _SHIFTL(count, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmem, 16, 16) | _SHIFTL(a4, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
#define aUnkCmd3(pkt, a1, a2, a3) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_UNK3, 24, 8) | _SHIFTL(a3, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(a1, 16, 16) | _SHIFTL(a2, 0, 16); \
|
||||
}
|
||||
|
||||
#define aInterleave(pkt, l, r) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \
|
||||
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
|
||||
#define aUnkCmd19(pkt, a1, a2, a3, a4) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_UNK19, 24, 8) | _SHIFTL(a1, 16, 8) | \
|
||||
_SHIFTL(a2, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(a3, 16, 16) | _SHIFTL(a4, 0, 16); \
|
||||
}
|
||||
|
||||
#define aLoadBuffer(pkt, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
#define aS8Dec(pkt, a1, a2) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(a1, 16, 8); \
|
||||
_a->words.w1 = (u32)(a2); \
|
||||
}
|
||||
|
||||
#define aMix(pkt, f, g, i, o) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(g, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(i,16, 16) | _SHIFTL(o, 0, 16); \
|
||||
/*
|
||||
* Clears DMEM by writing zeros.
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param dmem DMEM address to clear
|
||||
* @param size number of bytes to clear (rounded up to the next multiple of 16)
|
||||
*/
|
||||
#define aClearBuffer(pkt, dmem, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(dmem, 0, 24); \
|
||||
_a->words.w1 = (uintptr_t)(size); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, dmemi, count, swapLR, x0, x1, x2, x3, m) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(dmemi >> 4, 16, 8) | \
|
||||
_SHIFTL(count, 8, 8) | _SHIFTL(swapLR, 4, 1) | \
|
||||
_SHIFTL(x0, 3, 1) | _SHIFTL(x1, 2, 1) | \
|
||||
_SHIFTL(x2, 1, 1) | _SHIFTL(x3, 0, 1)); \
|
||||
_a->words.w1 = (u32)(m); \
|
||||
}
|
||||
|
||||
#define aPan(pkt, f, d, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(d, 0, 16)); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
#define aInterleave(pkt, o, l, r, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_INTERLEAVE, 24, 8) | \
|
||||
_SHIFTL(c >> 4, 16, 8) | _SHIFTL(o, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
|
||||
}
|
||||
|
||||
#define aResample(pkt, f, p, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(f, 16, 8) |\
|
||||
_SHIFTL(p, 0, 16)); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
#define aInterl(pkt, dmemi, dmemo, count) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(count, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemi, 16, 16) | _SHIFTL(dmemo, 0, 16); \
|
||||
}
|
||||
|
||||
#define aSaveBuffer(pkt, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8); \
|
||||
_a->words.w1 = (unsigned int)(s); \
|
||||
/*
|
||||
* Loads a buffer to DMEM from any physical source address, KSEG0, or KSEG1
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param addrSrc Any physical source address, KSEG0, or KSEG1
|
||||
* @param dmemDest DMEM destination address
|
||||
* @param size number of bytes to copy (rounded down to the next multiple of 16)
|
||||
*/
|
||||
#define aLoadBuffer(pkt, addrSrc, dmemDest, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_LOADBUFF, 24, 8) | _SHIFTL((size) >> 4, 16, 8) | _SHIFTL(dmemDest, 0, 16)); \
|
||||
_a->words.w1 = (uintptr_t)(addrSrc); \
|
||||
}
|
||||
|
||||
#define aMix(pkt, f, g, i, o) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(g, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
#define aSegment(pkt, s, b) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \
|
||||
_a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \
|
||||
#define aPan(pkt, f, d, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(d, 0, 16)); \
|
||||
_a->words.w1 = (u32)(s); \
|
||||
}
|
||||
|
||||
#define aSetBuffer(pkt, f, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(i, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
#define aResample(pkt, f, p, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | \
|
||||
_SHIFTL(f, 16, 8) | _SHIFTL(p, 0, 16)); \
|
||||
_a->words.w1 = (u32)(s); \
|
||||
}
|
||||
|
||||
#define aSetVolume(pkt, f, v, t, r) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
|
||||
_SHIFTL(v, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(t, 16, 16) | _SHIFTL(r, 0, 16); \
|
||||
/*
|
||||
* Stores a buffer from DMEM to any physical source address, KSEG0, or KSEG1
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param dmemSrc DMEM source address
|
||||
* @param addrDest Any physical source address, KSEG0, or KSEG1
|
||||
* @param size number of bytes to copy (rounded down to the next multiple of 16)
|
||||
*/
|
||||
#define aSaveBuffer(pkt, dmemSrc, addrDest, size) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SAVEBUFF, 24, 8) | _SHIFTL((size) >> 4, 16, 8) | _SHIFTL(dmemSrc, 0, 16)); \
|
||||
_a->words.w1 = (uintptr_t)(addrDest); \
|
||||
}
|
||||
|
||||
#define aSegment(pkt, s, b) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \
|
||||
_a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \
|
||||
}
|
||||
|
||||
#define aSetLoop(pkt, a) \
|
||||
#define aSetBuffer(pkt, f, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
_a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
|
||||
_a->words.w1 = (unsigned int)(a); \
|
||||
}
|
||||
|
||||
#define aDMEMMove(pkt, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(i, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
#define aLoadADPCM(pkt, c, d) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \
|
||||
_a->words.w1 = (unsigned int) d; \
|
||||
#define aSetVolume(pkt, f, v, t, r) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
|
||||
_SHIFTL(v, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(r, 0, 16) | _SHIFTL(t, 16, 16); \
|
||||
}
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
#define aSetVolume32(pkt, f, v, tr) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
|
||||
_SHIFTL(v, 0, 16)); \
|
||||
_a->words.w1 = (u32)(tr); \
|
||||
}
|
||||
|
||||
#endif /* !_ABI_H_ */
|
||||
#define aSetLoop(pkt, a) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
|
||||
_a->words.w1 = (u32)(a); \
|
||||
}
|
||||
|
||||
#define aDMEMMove(pkt, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
#define aLoadADPCM(pkt, c, d) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \
|
||||
_a->words.w1 = (u32)d; \
|
||||
}
|
||||
|
||||
#define aEnvSetup1(pkt, a, b, c, d) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
|
||||
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup2(pkt, volLeft, volRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
|
||||
_a->words.w1 = (_SHIFTL(volLeft, 16, 16) | \
|
||||
_SHIFTL(volRight, 0, 16)); \
|
||||
}
|
||||
|
||||
#define aFilter(pkt, f, countOrBuf, addr) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_FILTER, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(countOrBuf, 0, 16)); \
|
||||
_a->words.w1 = (u32)(addr); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Duplicates 128 bytes of data a specified number of times.
|
||||
*
|
||||
* @param pkt pointer to an Acmd buffer
|
||||
* @param numCopies number of times to duplicate 128 bytes from src
|
||||
* @param dmemSrc DMEM source address
|
||||
* @param dmemDest DMEM destination address for the duplicates, size 128 * numCopies
|
||||
*/
|
||||
#define aDuplicate(pkt, numCopies, dmemSrc, dmemDest) \
|
||||
{ \
|
||||
Acmd* _a = (Acmd*)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | _SHIFTL(numCopies, 16, 8) | _SHIFTL(dmemSrc, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemDest, 16, 16) | _SHIFTL(0x80, 0, 16); \
|
||||
}
|
||||
|
||||
#define aAddMixer(pkt, count, dmemi, dmemo, a4) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ADDMIXER, 24, 8) | \
|
||||
_SHIFTL(count >> 4, 16, 8) | _SHIFTL(a4, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(dmemi, 16, 16) | _SHIFTL(dmemo, 0, 16); \
|
||||
}
|
||||
|
||||
#define aResampleZoh(pkt, pitch, pitchAccu) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
|
||||
_SHIFTL(pitch, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(pitchAccu, 0, 16); \
|
||||
}
|
||||
|
||||
#endif /* ULTRA64_ABI_H */
|
||||
|
||||
+11
-13
@@ -1,11 +1,9 @@
|
||||
#ifndef AUDIOTHREAD_CMD_H
|
||||
#define AUDIOTHREAD_CMD_H
|
||||
|
||||
|
||||
void AudioThread_QueueCmd(u32, void**);
|
||||
void AudioThread_QueueCmdF32(u32, f32);
|
||||
void AudioThread_QueueCmdS32(u32, u32);
|
||||
void AudioThread_QueueCmdS8(u32, s8);
|
||||
void AudioThread_QueueCmdF32(u32 opArgs, f32 val);
|
||||
void AudioThread_QueueCmdS32(u32 opArgs, u32 val);
|
||||
void AudioThread_QueueCmdS8(u32 opArgs, s8 val);
|
||||
|
||||
/**
|
||||
* Audio thread commands to safely transfer information/requests/data
|
||||
@@ -247,8 +245,8 @@ typedef enum {
|
||||
* @param ioPort the index of the array to store the input-output value
|
||||
* @param ioData (s8) the value that's written to the input-output array
|
||||
*/
|
||||
#define AUDIOCMD_SEQPLAYER_SET_IO(seqPlayerIndex, unk, ioPort, ioData) \
|
||||
AudioThread_QueueCmdS8(AUDIO_MK_CMD(AUDIOCMD_OP_SEQPLAYER_SET_IO, seqPlayerIndex, unk, ioPort), ioData)
|
||||
#define AUDIOCMD_SEQPLAYER_SET_IO(seqPlayerIndex, unk, ioData) \
|
||||
AudioThread_QueueCmdS8(AUDIO_MK_CMD(AUDIOCMD_OP_SEQPLAYER_SET_IO, seqPlayerIndex, unk, 0), ioData)
|
||||
|
||||
/**
|
||||
* Set the tempo (bpm) of a sequence on a given seqPlayer
|
||||
@@ -344,8 +342,8 @@ typedef enum {
|
||||
* @param seqId the id of the sequence to play, see `SeqId`
|
||||
* @param fadeInTimer (s32) number of ticks to fade in the sequence to the requested volume
|
||||
*/
|
||||
#define AUDIOCMD_GLOBAL_INIT_SEQPLAYER(seqPlayerIndex, seqId, fadeInTimer) \
|
||||
AudioThread_QueueCmdS32(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER, seqPlayerIndex, seqId, 0), fadeInTimer)
|
||||
#define AUDIOCMD_GLOBAL_INIT_SEQPLAYER(seqPlayerIndex, seqId, arg2, fadeInTimer) \
|
||||
AudioThread_QueueCmdS32(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER, seqPlayerIndex, seqId, arg2), fadeInTimer)
|
||||
|
||||
/**
|
||||
* Disable a sequence player
|
||||
@@ -456,8 +454,8 @@ typedef enum {
|
||||
* @param sampleBankId the id of the samplebank to load
|
||||
* @param retData return data from `externalLoadQueue`
|
||||
*/
|
||||
#define AUDIOCMD_GLOBAL_ASYNC_LOAD_SAMPLE_BANK(sampleBankId, retData) \
|
||||
AudioThread_QueueCmdS8(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_ASYNC_LOAD_SAMPLE_BANK, sampleBankId, 0, retData), 0)
|
||||
#define AUDIOCMD_GLOBAL_ASYNC_LOAD_SAMPLE_BANK(sampleBankId, nChunks, retData) \
|
||||
AudioThread_QueueCmdS8(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_ASYNC_LOAD_SAMPLE_BANK, sampleBankId, nChunks, retData), 0)
|
||||
|
||||
/**
|
||||
* Asynchronously load a font
|
||||
@@ -465,8 +463,8 @@ typedef enum {
|
||||
* @param fontId the id of the soundfont to load
|
||||
* @param retData return data from `externalLoadQueue`
|
||||
*/
|
||||
#define AUDIOCMD_GLOBAL_ASYNC_LOAD_FONT(fontId, unk, retData) \
|
||||
AudioThread_QueueCmdS8(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_ASYNC_LOAD_FONT, fontId, unk, retData), 0)
|
||||
#define AUDIOCMD_GLOBAL_ASYNC_LOAD_FONT(fontId, nChunks, retData) \
|
||||
AudioThread_QueueCmdS8(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_ASYNC_LOAD_FONT, fontId, nChunks, retData), 0)
|
||||
|
||||
/**
|
||||
* Discard sequence fonts
|
||||
|
||||
@@ -134,8 +134,8 @@ void AudioLoad_Init(void);
|
||||
void func_80016A50(void);
|
||||
void Audio_InitSounds(void);
|
||||
void Audio_Update(void);
|
||||
SPTask* func_8001DF50(void);
|
||||
void func_8001EE00(void);
|
||||
SPTask* AudioThread_CreateTask(void);
|
||||
void AudioThread_PreNMIReset(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -262,7 +262,7 @@ typedef struct {
|
||||
/* 0x005 */ s8 unk_05;
|
||||
/* 0x006 */ u16 windowSize;
|
||||
/* 0x008 */ u16 unk_08;
|
||||
/* 0x00A */ s16 unk_0A;
|
||||
/* 0x00A */ u16 unk_0A;
|
||||
/* 0x00C */ u16 decayRatio; // determines how much reverb persists
|
||||
/* 0x00E */ u16 unk_0E;
|
||||
/* 0x010 */ s32 nextRingBufPos;
|
||||
@@ -302,7 +302,7 @@ typedef struct {
|
||||
/* 0x004 */ u8 seqId;
|
||||
/* 0x005 */ u8 defaultFont;
|
||||
/* 0x006 */ u8 unk_06[1];
|
||||
/* 0x007 */ s8 playerIdx;
|
||||
/* 0x007 */ s8 unk_07[1]; // indexed like an array, but that can't be
|
||||
/* 0x008 */ u16 tempo; // seqTicks per minute
|
||||
/* 0x00A */ u16 tempoAcc; // tempo accumulation, used in a discretized algorithm to apply tempo.
|
||||
/* 0x00C */ u16 tempoChange; // Used to adjust the tempo without altering the base tempo.
|
||||
@@ -318,14 +318,14 @@ typedef struct {
|
||||
/* 0x02C */ f32 fadeVolumeMod;
|
||||
/* 0x030 */ f32 appliedFadeVolume;
|
||||
// /* 0x034 */ f32 bend;
|
||||
/* 0x038 */ struct SequenceChannel* channels[16];
|
||||
/* 0x078 */ SeqScriptState scriptState;
|
||||
/* 0x094 */ u8* shortNoteVelocityTable;
|
||||
/* 0x098 */ u8* shortNoteGateTimeTable;
|
||||
/* 0x09C */ NotePool notePool;
|
||||
/* 0x0DC */ s32 skipTicks;
|
||||
/* 0x0E0 */ u32 scriptCounter;
|
||||
/* 0x0E4 */ char
|
||||
/* 0x034 */ struct SequenceChannel* channels[16];
|
||||
/* 0x074 */ SeqScriptState scriptState;
|
||||
/* 0x090 */ u8* shortNoteVelocityTable;
|
||||
/* 0x094 */ u8* shortNoteGateTimeTable;
|
||||
/* 0x098 */ NotePool notePool;
|
||||
/* 0x0D8 */ s32 skipTicks;
|
||||
/* 0x0DC */ u32 scriptCounter;
|
||||
/* 0x0E0 */ char
|
||||
padE4[0x6C]; // unused struct members for sequence/sound font dma management, according to sm64 decomp
|
||||
} SequencePlayer; // size = 0x14C
|
||||
|
||||
@@ -476,14 +476,28 @@ typedef struct SequenceLayer {
|
||||
/* 0x7C */ char pad7C[4];
|
||||
} SequenceLayer; //size = 0x80
|
||||
|
||||
typedef struct UnkStruct_800097A8 {
|
||||
/* 0x00 */ s16* unk_0;
|
||||
/* 0x04 */ s32 unk_4;
|
||||
/* 0x08 */ s32 unk_8;
|
||||
/* 0x0C */ s16* unk_C;
|
||||
/* 0x10 */ char pad10[4];
|
||||
/* 0x14 */ struct SampleDma* unk_14;
|
||||
/* 0x18 */ s16 unk18;
|
||||
/* 0x1A */ char pad1A[6];
|
||||
} UnkStruct_800097A8; /* size = 0x20 */
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 adpcmdecState[16];
|
||||
/* 0x020 */ s16 finalResampleState[16];
|
||||
/* 0x040 */ s16 mixEnvelopeState[32];
|
||||
/* 0x080 */ s16 unusedState[16];
|
||||
/* 0x0A0 */ s16 haasEffectDelayState[32];
|
||||
/* 0x0E0 */ s16 combFilterState[128];
|
||||
} NoteSynthesisBuffers; // size = 0x1E0
|
||||
/* 0x040 */ UnkStruct_800097A8 unk_40;
|
||||
/* 0x060 */ char pad[0x20];
|
||||
/* 0x080 */ s16 panSamplesBuffer[0x20];
|
||||
// /* 0x040 */ s16 mixEnvelopeState[32];
|
||||
// /* 0x080 */ s16 unusedState[16];
|
||||
// /* 0x0A0 */ s16 haasEffectDelayState[32];
|
||||
// /* 0x0E0 */ s16 combFilterState[128];
|
||||
} NoteSynthesisBuffers; // size = 0xC0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 restart;
|
||||
@@ -547,13 +561,19 @@ typedef struct {
|
||||
} bitField0;
|
||||
struct {
|
||||
/* 0x01 */ u8 reverbIndex : 3;
|
||||
/* 0x01 */ u8 bookOffset : 2;
|
||||
/* 0x01 */ u8 bookOffset : 3;
|
||||
// /* 0x01 */ u8 isSyntheticWave : 1;
|
||||
/* 0x01 */ u8 isSyntheticWave : 1;
|
||||
/* 0x01 */ u8 hasTwoParts : 1;
|
||||
/* 0x01 */ u8 useHaasEffect : 1;
|
||||
} bitField1;
|
||||
/* 0x02 */ u8 pad2[0xA];
|
||||
/* 0x0C*/ s16* waveSampleAddr;
|
||||
/* 0x02 */ u8 unk_02;
|
||||
/* 0x03 */ u8 unk_03;
|
||||
/* 0x04 */ u8 unk_04;
|
||||
/* 0x05 */ u8 unk_05;
|
||||
/* 0x06 */ u16 unk_06;
|
||||
/* 0x08 */ u16 unk_08;
|
||||
/* 0x0A */ u16 unk_0A;
|
||||
/* 0x0C */ s16* waveSampleAddr;
|
||||
} NoteSubEu; // size = 0x10
|
||||
|
||||
typedef struct Note {
|
||||
@@ -781,7 +801,7 @@ typedef struct {
|
||||
/* 0x10 */ AudioTableEntry entries[1]; // (dynamic size)
|
||||
} AudioTable; // size >= 0x20
|
||||
|
||||
typedef struct {
|
||||
typedef struct SampleDma {
|
||||
/* 0x00 */ u8* ramAddr;
|
||||
/* 0x04 */ u32 devAddr;
|
||||
/* 0x08 */ u16 sizeUnused;
|
||||
@@ -998,6 +1018,19 @@ typedef struct {
|
||||
((bit10)<<21)|((bit11)<<20)|((bit12)<<19)|((bit13)<<18))
|
||||
|
||||
void func_80008780(f32 *, s32, f32 *);
|
||||
void func_80009A2C(s32 updateIndex, s32 noteIndex);
|
||||
void func_80009AAC(s32 updateIndex);
|
||||
Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synthState, s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex);
|
||||
Acmd* func_8000A25C(s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex);
|
||||
Acmd* func_800098DC(Acmd* aList, u16 dmem, u16 startPos, s32 size, s32 reverbIndex);
|
||||
Acmd* func_80009984(Acmd* aList, u16 dmem, u16 startPos, s32 size, s32 reverbIndex);
|
||||
Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen);
|
||||
Acmd* func_80009D78(Acmd* aList, s32 aiBufLen, s16 reverbIndex, s16 updateIndex);
|
||||
Acmd* func_8000A128(Acmd* aList, s16 reverbIndex, s16 updateIndex);
|
||||
Acmd* func_8000B3F0(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthState, s32 numSamplesToLoad);
|
||||
Acmd* func_8000B480(Acmd* aList, NoteSynthesisState* synthState, s32 size, u16 pitch, u16 inpDmem, u32 resampleFlags);
|
||||
Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthState, s32 aiBufLen, u16 dmemSrc, s32 delaySide, s32 flags);
|
||||
Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthState, s32 size, s32 flags, s32 delaySide);
|
||||
|
||||
void AudioHeap_ResetLoadStatus(void);
|
||||
void AudioHeap_DiscardFont(s32 fontId);
|
||||
@@ -1039,12 +1072,12 @@ void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, u32 arg2, u8* dmaIndexRef,
|
||||
void AudioLoad_InitSampleDmaBuffers(s32 numNotes);
|
||||
void AudioLoad_InitTable(AudioTable* table, u8* romAddr, u16 unkMediumParam);
|
||||
void* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outFontId);
|
||||
void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1);
|
||||
void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 flags);
|
||||
s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId);
|
||||
s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId);
|
||||
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
|
||||
void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
|
||||
void* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts);
|
||||
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 nChunks, s32 retData, OSMesgQueue* retQueue);
|
||||
void AudioLoad_AsyncLoadSeq(s32 seqId, s32 nChunks, s32 retData, OSMesgQueue* retQueue);
|
||||
u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts);
|
||||
void AudioLoad_DiscardSeqFonts(s32 seqId);
|
||||
s32 AudioLoad_DiscardFont(s32 fontId);
|
||||
void AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2);
|
||||
@@ -1116,19 +1149,20 @@ void func_800132E8(void);
|
||||
|
||||
void func_800144E4(SequencePlayer*);
|
||||
void func_800145BC(AudioListItem*, AudioListItem*);
|
||||
void func_8001678C(s32);
|
||||
void func_80016804(s32);
|
||||
void func_800168BC(void);
|
||||
|
||||
|
||||
|
||||
SPTask* func_8001DF50(void);
|
||||
void func_8001E920(void);
|
||||
OSMesg func_8001ECAC(s32 *);
|
||||
void* func_8001ED14(s32 seqId, u32* outNumFonts);
|
||||
SPTask* AudioThread_CreateTask(void);
|
||||
void AudioThread_ScheduleProcessCmds(void);
|
||||
u32 AudioThread_GetAsyncLoadStatus(u32 *);
|
||||
u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts);
|
||||
s32 func_8001ED34(void);
|
||||
void func_8001ED8C(OSMesg);
|
||||
void func_8001EE00(void);
|
||||
void func_8001EE3C(void);
|
||||
void AudioThread_ResetAudioHeap(s32);
|
||||
void AudioThread_PreNMIReset(void);
|
||||
void AudioThread_Init(void);
|
||||
|
||||
|
||||
|
||||
@@ -1197,14 +1231,14 @@ extern u16 gSampleBankMedium;
|
||||
|
||||
|
||||
|
||||
extern s8 gThreadCmdWritePos;
|
||||
extern s8 gThreadCmdReadPos;
|
||||
// extern u8 gThreadCmdWritePos;
|
||||
// extern u8 gThreadCmdReadPos;
|
||||
extern OSMesgQueue* gAudioTaskStartQueue;
|
||||
extern OSMesgQueue* gThreadCmdProcQueue;
|
||||
extern OSMesgQueue* gAudioUnkQueue;
|
||||
extern OSMesgQueue* gAudioResetQueue;
|
||||
extern s32 gMaxAbiCmdCnt;
|
||||
extern AudioTask* gWaitingAudioTask;
|
||||
extern SPTask* gWaitingAudioTask;
|
||||
extern s32 D_800C7C70;
|
||||
extern u8 gCurCmdReadPos;
|
||||
extern u8 gThreadCmdQueueFinished;
|
||||
@@ -1344,14 +1378,14 @@ extern volatile s32 gAudioTaskCountQ;
|
||||
extern s32 gCurAudioFrameDmaCount;
|
||||
extern s32 gAudioTaskIndexQ;
|
||||
extern s32 gCurAiBuffIndex;
|
||||
extern void* gAbiCmdBuffs[2];
|
||||
extern Acmd* gCurAiCmdBuffer;
|
||||
extern AudioTask* gAudioCurTask;
|
||||
extern AudioTask gAudioRspTasks[2];
|
||||
extern Acmd* gAbiCmdBuffs[2];
|
||||
extern Acmd* gCurAbiCmdBuffer;
|
||||
extern SPTask* gAudioCurTask;
|
||||
extern SPTask gAudioRspTasks[2];
|
||||
extern f32 gMaxTempoTvTypeFactors;
|
||||
extern s32 gRefreshRate;
|
||||
extern u16* gAiBuffers[3];
|
||||
extern u16 gAiBuffLengths[3];
|
||||
extern s16* gAiBuffers[3];
|
||||
extern s16 gAiBuffLengths[3];
|
||||
extern u32 gAudioRandom;
|
||||
extern UNK_TYPE D_80155D88;
|
||||
extern volatile u32 gResetTimer;
|
||||
|
||||
Reference in New Issue
Block a user