Decompile audioStopThread

This commit is contained in:
Ryan Dwyer 2020-10-01 08:07:22 +10:00
parent 1505534065
commit c676e24f82
5 changed files with 15 additions and 20 deletions

View File

@ -2120,7 +2120,7 @@ glabel resetproc
/* 2e20: 24060001 */ addiu $a2,$zero,0x1
/* 2e24: 240e0001 */ addiu $t6,$zero,0x1
/* 2e28: 3c018006 */ lui $at,%hi(var8005ced0)
/* 2e2c: 0c002449 */ jal func00009124
/* 2e2c: 0c002449 */ jal audioStopThread
/* 2e30: a02eced0 */ sb $t6,%lo(var8005ced0)($at)
/* 2e34: 3c048009 */ lui $a0,%hi(var8008d6d0)
/* 2e38: 0c0120dc */ jal osStopThread

View File

@ -3420,7 +3420,7 @@ u32 var8005d500 = 0x00000000;
u32 var8005d504 = 0x00000000;
u32 var8005d508 = 0x00000000;
u32 var8005d50c = 0x00000000;
u8 g_AudioIsThreadRunning = false;
s8 g_AudioIsThreadRunning = false;
u32 var8005d514 = 0x00000001;
u32 var8005d518 = 0x00000001;
u32 var8005d51c = 0x00000000;

View File

@ -74,7 +74,7 @@ extern u32 var8005d390;
extern u32 var8005d3b8;
extern u32 var8005d4c0;
extern u32 var8005d4e8;
extern u8 g_AudioIsThreadRunning;
extern s8 g_AudioIsThreadRunning;
extern u32 var8005d520;
extern struct rend_vidat var8005d530;
extern u32 var8005d588;

View File

@ -7,7 +7,7 @@ u32 func00008a20(void);
u32 func00008a48(void);
void audioStartThread(void);
u32 func00009118(void);
u32 func00009124(void);
void audioStopThread(void);
u32 func00009448(void);
u32 func00009614(void);

View File

@ -509,22 +509,17 @@ glabel func00009118
/* 9120: 24421810 */ addiu $v0,$v0,%lo(var80091810)
);
GLOBAL_ASM(
glabel func00009124
/* 9124: 3c0e8006 */ lui $t6,%hi(g_AudioIsThreadRunning)
/* 9128: 81ced510 */ lb $t6,%lo(g_AudioIsThreadRunning)($t6)
/* 912c: 27bdffe8 */ addiu $sp,$sp,-24
/* 9130: afbf0014 */ sw $ra,0x14($sp)
/* 9134: 11c00003 */ beqz $t6,.L00009144
/* 9138: 3c048009 */ lui $a0,%hi(g_AudioThread)
/* 913c: 0c0120dc */ jal osStopThread
/* 9140: 248415e0 */ addiu $a0,$a0,%lo(g_AudioThread)
.L00009144:
/* 9144: 8fbf0014 */ lw $ra,0x14($sp)
/* 9148: 27bd0018 */ addiu $sp,$sp,0x18
/* 914c: 03e00008 */ jr $ra
/* 9150: 00000000 */ nop
);
/**
* This doesn't set g_AudioIsThreadRunning to false, but that's okay because
* this is only called when resetting the console, and when that happens the
* variable is likely reset too.
*/
void audioStopThread(void)
{
if (g_AudioIsThreadRunning) {
osStopThread(&g_AudioThread);
}
}
GLOBAL_ASM(
glabel func00009154