Decompile n_alSndpNew

This commit is contained in:
Ryan Dwyer 2021-10-18 19:25:49 +10:00
parent ecf8582048
commit 4983665e01
13 changed files with 3093 additions and 3536 deletions

View File

@ -440,6 +440,7 @@ enum ALMsg {
/*0x17*/ AL_VIB_OSC_EVT,
/*0x18*/ AL_18_EVT,
/*0x19*/ AL_19_EVT,
/*0x20*/ AL_20_EVT = 0x20, // AL_SNDP_API_EVENT? But is already used and is internal
/*0x400*/ AL_400_EVT = 0x400
};
@ -925,9 +926,11 @@ void alCSPSendMidi(ALCSPlayer *seqp, s32 ticks, u8 status,
***********************************************************************/
typedef struct {
s32 maxSounds;
s32 maxStates;
s32 maxEvents;
s32 maxSounds;
ALHeap *heap;
u16 unk10;
} ALSndpConfig;
typedef struct {

View File

@ -383,7 +383,7 @@ typedef struct {
ALMicroTime curTime;
} N_ALSndPlayer;
void n_alSndpNew(N_ALSndPlayer *sndp, ALSndpConfig *c);
void n_alSndpNew(ALSndpConfig *c);
void n_alSndpDelete(void);
ALSndId n_alSndpAllocate(ALSound *sound);
void n_alSndpDeallocate(ALSndId id);

View File

@ -71,6 +71,7 @@
build/ROMID/lib/lib_2fc60.o (section); \
build/ROMID/lib/naudio/n_synthesizer.o (section); \
build/ROMID/lib/ultra/audio/sl.o (section); \
build/ROMID/lib/naudio/n_sndplayer.o (section); \
build/ROMID/lib/lib_317f0.o (section); \
build/ROMID/lib/speaker.o (section); \
build/ROMID/lib/naudio/n_csplayer.o (section); \

View File

@ -68,6 +68,7 @@
build/ROMID/lib/lib_2fc60.o (section); \
build/ROMID/lib/naudio/n_synthesizer.o (section); \
build/ROMID/lib/ultra/audio/sl.o (section); \
build/ROMID/lib/naudio/n_sndplayer.o (section); \
build/ROMID/lib/lib_317f0.o (section); \
build/ROMID/lib/speaker.o (section); \
build/ROMID/lib/naudio/n_csplayer.o (section); \

View File

@ -68,6 +68,7 @@
build/ROMID/lib/lib_2fc60.o (section); \
build/ROMID/lib/naudio/n_synthesizer.o (section); \
build/ROMID/lib/ultra/audio/sl.o (section); \
build/ROMID/lib/naudio/n_sndplayer.o (section); \
build/ROMID/lib/lib_317f0.o (section); \
build/ROMID/lib/speaker.o (section); \
build/ROMID/lib/naudio/n_csplayer.o (section); \

View File

@ -47,7 +47,7 @@ extern s32 g_TileNumRooms;
extern u32 *g_TileRooms;
extern u32 var8009a918;
extern u8 g_RdpDramStack[SP_DRAM_STACK_SIZE8];
extern u32 var8009c2d0;
extern N_ALSndPlayer var8009c2d0;
extern struct var8009c340 var8009c340;
extern u8 var8009c344[2];
extern u32 var8009c3e0;

View File

@ -77,8 +77,8 @@ extern u16 *g_RdpOutBufferStart;
extern struct rdptask *g_RdpCurTask;
extern u32 var8005f120;
extern u32 var8005f124;
extern u32 var8005f128;
extern struct var8005f12c *var8005f12c;
extern void *var8005f128;
extern N_ALSndPlayer *g_SndPlayer;
extern u32 var8005f130;
extern u32 var8005f134;
extern u32 var8005f138;

View File

@ -4,7 +4,6 @@
#include "data.h"
#include "types.h"
void func000317f0(void *arg0);
u32 func00031b34(void);
u32 func00033090(void);
u32 func00033100(void);

View File

@ -7389,13 +7389,27 @@ struct var8007f8dc {
/*0x100*/ u32 unk100;
};
struct var8005f12c {
u32 unk00;
u32 unk04;
struct sndstate {
ALLink node;
u32 unk08;
u32 unk0c;
u32 unk10;
ALEventQueue evtq;
u32 unk14;
u32 unk18;
u32 unk1c;
u32 unk20;
u32 unk24;
u32 unk28;
u32 unk2c;
u32 unk30;
u32 unk34;
u32 unk38;
u32 unk3c;
u32 unk40;
u32 unk44;
#if VERSION >= VERSION_NTSC_1_0
u32 unk48;
#endif
};
#endif

View File

@ -9,30 +9,7 @@
u32 var8009b870;
u32 var8009b874;
u32 var8009b878[662];
u32 var8009c2d0;
u32 var8009c2d4;
u32 var8009c2d8;
u32 var8009c2dc;
u32 var8009c2e0;
u32 var8009c2e4;
u32 var8009c2e8;
u32 var8009c2ec;
u32 var8009c2f0;
u32 var8009c2f4;
u32 var8009c2f8;
u32 var8009c2fc;
u32 var8009c300;
u32 var8009c304;
u32 var8009c308;
u32 var8009c30c;
u32 var8009c310;
u32 var8009c314;
u32 var8009c318;
u32 var8009c31c;
u32 var8009c320;
u32 var8009c324;
u32 var8009c328;
u32 var8009c32c;
N_ALSndPlayer var8009c2d0;
GLOBAL_ASM(
glabel func0002fc60

File diff suppressed because it is too large Load Diff

3027
src/lib/naudio/n_sndplayer.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2076,7 +2076,7 @@ glabel snd0000f7b8
void sndInit(void)
{
u32 sp7c[5];
ALSndpConfig sndpconfig;
#if VERSION >= VERSION_PAL_FINAL
u32 heaplen = 1024 * 446;
@ -2174,11 +2174,11 @@ void sndInit(void)
synconfig.fxTypes[i] = 6;
}
sp7c[1] = 64;
sp7c[0] = 64;
sp7c[2] = 20;
*(u16 *)&sp7c[4] = 9;
sp7c[3] = (u32) &g_SndHeap;
sndpconfig.maxEvents = 64;
sndpconfig.maxStates = 64;
sndpconfig.maxSounds = 20;
sndpconfig.unk10 = 9;
sndpconfig.heap = &g_SndHeap;
#if VERSION >= VERSION_PAL_FINAL
settings[0] = 22020;
@ -2206,7 +2206,7 @@ void sndInit(void)
osSyncPrintf("gsSndpNew\n");
func000317f0(&sp7c);
n_alSndpNew(&sndpconfig);
osSyncPrintf("Set the sample callbacks\n");