Decompile audioIsPlaying

This commit is contained in:
Ryan Dwyer
2021-10-17 15:31:00 +10:00
parent c0e2bcb5ec
commit f307e51067
4 changed files with 29 additions and 19 deletions
+1
View File
@@ -103,6 +103,7 @@ G_C_FILES := \
$(shell find src/lib/ultra/audio -name '*.c') \
$(shell find src/lib/naudio -name '*.c') \
src/lib/lib_2fba0.c \
src/lib/lib_317f0.c \
src/lib/lib_3a100.c \
src/lib/lib_3e730.c \
src/lib/mp3.c \
+1 -1
View File
@@ -14,7 +14,7 @@ void func00033378(void *fn);
u32 func00033390(void);
void func00033634(void *fn);
u32 func0003364c(void);
u32 audioIsPlaying(struct audiohandle *handle);
bool audioIsPlaying(struct audiohandle *handle);
struct audiohandle *func00033820(s32 arg0, s16 soundnum, s32 arg2, s32 arg3, f32 arg4, s32 arg5, s32 arg6, struct audiohandle **handle);
void audioStop(struct audiohandle *handle);
u32 func00033bc0(void);
+19 -1
View File
@@ -2123,7 +2123,25 @@ struct eyespy {
};
struct audiohandle {
u32 unk00;
/*0x00*/ u32 unk00;
/*0x04*/ u32 unk04;
/*0x08*/ u32 unk08;
/*0x0c*/ u32 unk0c;
/*0x10*/ u32 unk10;
/*0x14*/ u32 unk14;
/*0x18*/ u32 unk18;
/*0x1c*/ u32 unk1c;
/*0x20*/ u32 unk20;
/*0x24*/ u32 unk24;
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ u32 unk30;
/*0x34*/ u32 unk34;
/*0x38*/ u32 unk38;
/*0x3c*/ u32 unk3c;
/*0x40*/ u32 unk40;
/*0x44*/ u8 unk44;
/*0x45*/ u8 playing;
};
/**
+8 -17
View File
@@ -4031,23 +4031,14 @@ glabel func0003364c
/* 337ec: 00000000 */ nop
);
GLOBAL_ASM(
glabel audioIsPlaying
/* 337f0: 10800005 */ beqz $a0,.L00033808
/* 337f4: 00000000 */ nop
/* 337f8: 03e00008 */ jr $ra
/* 337fc: 90820045 */ lbu $v0,0x45($a0)
/* 33800: 10000003 */ b .L00033810
/* 33804: 00000000 */ nop
.L00033808:
/* 33808: 03e00008 */ jr $ra
/* 3380c: 00001025 */ or $v0,$zero,$zero
.L00033810:
/* 33810: 03e00008 */ jr $ra
/* 33814: 00000000 */ nop
/* 33818: 03e00008 */ jr $ra
/* 3381c: 00000000 */ nop
);
bool audioIsPlaying(struct audiohandle *handle)
{
if (handle) {
return handle->playing;
} else {
return false;
}
}
#if VERSION >= VERSION_NTSC_1_0
GLOBAL_ASM(