diff --git a/asm/non_matchings/code/audio_heap/func_800DFBF8.s b/asm/non_matchings/code/audio_heap/func_800DFBF8.s deleted file mode 100644 index 8f79f84a2e..0000000000 --- a/asm/non_matchings/code/audio_heap/func_800DFBF8.s +++ /dev/null @@ -1,607 +0,0 @@ -.late_rodata -glabel D_80149410 - .float 2880000 - -.text -glabel func_800DFBF8 -/* B56D98 800DFBF8 27BDFF60 */ addiu $sp, $sp, -0xa0 -/* B56D9C 800DFBFC AFB60030 */ sw $s6, 0x30($sp) -/* B56DA0 800DFC00 3C168017 */ lui $s6, %hi(gAudioContext) # $s6, 0x8017 -/* B56DA4 800DFC04 26D6F180 */ addiu $s6, %lo(gAudioContext) # addiu $s6, $s6, -0xe80 -/* B56DA8 800DFC08 92CE3519 */ lbu $t6, 0x3519($s6) -/* B56DAC 800DFC0C 3C188013 */ lui $t8, %hi(gAudioSessionPresets) # $t8, 0x8013 -/* B56DB0 800DFC10 271837C8 */ addiu $t8, %lo(gAudioSessionPresets) # addiu $t8, $t8, 0x37c8 -/* B56DB4 800DFC14 000E78C0 */ sll $t7, $t6, 3 -/* B56DB8 800DFC18 01EE7823 */ subu $t7, $t7, $t6 -/* B56DBC 800DFC1C 000F78C0 */ sll $t7, $t7, 3 -/* B56DC0 800DFC20 AFBF003C */ sw $ra, 0x3c($sp) -/* B56DC4 800DFC24 AFBE0038 */ sw $fp, 0x38($sp) -/* B56DC8 800DFC28 AFB70034 */ sw $s7, 0x34($sp) -/* B56DCC 800DFC2C AFB5002C */ sw $s5, 0x2c($sp) -/* B56DD0 800DFC30 AFB40028 */ sw $s4, 0x28($sp) -/* B56DD4 800DFC34 AFB30024 */ sw $s3, 0x24($sp) -/* B56DD8 800DFC38 AFB20020 */ sw $s2, 0x20($sp) -/* B56DDC 800DFC3C AFB1001C */ sw $s1, 0x1c($sp) -/* B56DE0 800DFC40 AFB00018 */ sw $s0, 0x18($sp) -/* B56DE4 800DFC44 01F81021 */ addu $v0, $t7, $t8 -/* B56DE8 800DFC48 AEC02620 */ sw $zero, 0x2620($s6) -/* B56DEC 800DFC4C 8C590000 */ lw $t9, ($v0) -/* B56DF0 800DFC50 AFA20068 */ sw $v0, 0x68($sp) -/* B56DF4 800DFC54 A6D9284A */ sh $t9, 0x284a($s6) -/* B56DF8 800DFC58 0C040FFC */ jal osAiSetFrequency -/* B56DFC 800DFC5C 3324FFFF */ andi $a0, $t9, 0xffff -/* B56E00 800DFC60 96C3284A */ lhu $v1, 0x284a($s6) -/* B56E04 800DFC64 8EC92964 */ lw $t1, 0x2964($s6) -/* B56E08 800DFC68 8FA80068 */ lw $t0, 0x68($sp) -/* B56E0C 800DFC6C 44833000 */ mtc1 $v1, $f6 -/* B56E10 800DFC70 0069001A */ div $zero, $v1, $t1 -/* B56E14 800DFC74 00005012 */ mflo $t2 -/* B56E18 800DFC78 254B000F */ addiu $t3, $t2, 0xf -/* B56E1C 800DFC7C 316CFFF0 */ andi $t4, $t3, 0xfff0 -/* B56E20 800DFC80 A6CC284E */ sh $t4, 0x284e($s6) -/* B56E24 800DFC84 86C6284E */ lh $a2, 0x284e($s6) -/* B56E28 800DFC88 46803220 */ cvt.s.w $f8, $f6 -/* B56E2C 800DFC8C A6C2284C */ sh $v0, 0x284c($s6) -/* B56E30 800DFC90 15200002 */ bnez $t1, .L800DFC9C -/* B56E34 800DFC94 00000000 */ nop -/* B56E38 800DFC98 0007000D */ break 7 -.L800DFC9C: -/* B56E3C 800DFC9C 2401FFFF */ li $at, -1 -/* B56E40 800DFCA0 15210004 */ bne $t1, $at, .L800DFCB4 -/* B56E44 800DFCA4 3C018000 */ lui $at, 0x8000 -/* B56E48 800DFCA8 14610002 */ bne $v1, $at, .L800DFCB4 -/* B56E4C 800DFCAC 00000000 */ nop -/* B56E50 800DFCB0 0006000D */ break 6 -.L800DFCB4: -/* B56E54 800DFCB4 240100D0 */ li $at, 208 -/* B56E58 800DFCB8 24C40010 */ addiu $a0, $a2, 0x10 -/* B56E5C 800DFCBC 0081001A */ div $zero, $a0, $at -/* B56E60 800DFCC0 00007012 */ mflo $t6 -/* B56E64 800DFCC4 25CF0001 */ addiu $t7, $t6, 1 -/* B56E68 800DFCC8 A6CF2854 */ sh $t7, 0x2854($s6) -/* B56E6C 800DFCCC 86C72854 */ lh $a3, 0x2854($s6) -/* B56E70 800DFCD0 24CDFFF0 */ addiu $t5, $a2, -0x10 -/* B56E74 800DFCD4 A6CD2852 */ sh $t5, 0x2852($s6) -/* B56E78 800DFCD8 00C7001A */ div $zero, $a2, $a3 -/* B56E7C 800DFCDC 0000C012 */ mflo $t8 -/* B56E80 800DFCE0 44878000 */ mtc1 $a3, $f16 -/* B56E84 800DFCE4 A6C42850 */ sh $a0, 0x2850($s6) -/* B56E88 800DFCE8 14E00002 */ bnez $a3, .L800DFCF4 -/* B56E8C 800DFCEC 00000000 */ nop -/* B56E90 800DFCF0 0007000D */ break 7 -.L800DFCF4: -/* B56E94 800DFCF4 2401FFFF */ li $at, -1 -/* B56E98 800DFCF8 14E10004 */ bne $a3, $at, .L800DFD0C -/* B56E9C 800DFCFC 3C018000 */ lui $at, 0x8000 -/* B56EA0 800DFD00 14C10002 */ bne $a2, $at, .L800DFD0C -/* B56EA4 800DFD04 00000000 */ nop -/* B56EA8 800DFD08 0006000D */ break 6 -.L800DFD0C: -/* B56EAC 800DFD0C 2401FFF8 */ li $at, -8 -/* B56EB0 800DFD10 0301C824 */ and $t9, $t8, $at -/* B56EB4 800DFD14 3C0146FA */ li $at, 0x46FA0000 # 0.000000 -/* B56EB8 800DFD18 44812000 */ mtc1 $at, $f4 -/* B56EBC 800DFD1C 3C013B80 */ li $at, 0x3B800000 # 0.000000 -/* B56EC0 800DFD20 46808020 */ cvt.s.w $f0, $f16 -/* B56EC4 800DFD24 44819000 */ mtc1 $at, $f18 -/* B56EC8 800DFD28 3C013E80 */ li $at, 0x3E800000 # 0.000000 -/* B56ECC 800DFD2C A6D92856 */ sh $t9, 0x2856($s6) -/* B56ED0 800DFD30 86C52856 */ lh $a1, 0x2856($s6) -/* B56ED4 800DFD34 46082283 */ div.s $f10, $f4, $f8 -/* B56ED8 800DFD38 44812000 */ mtc1 $at, $f4 -/* B56EDC 800DFD3C 3C013F80 */ lui $at, 0x3f80 -/* B56EE0 800DFD40 24AA0008 */ addiu $t2, $a1, 8 -/* B56EE4 800DFD44 46040202 */ mul.s $f8, $f0, $f4 -/* B56EE8 800DFD48 24ABFFF8 */ addiu $t3, $a1, -8 -/* B56EEC 800DFD4C A6CA2858 */ sh $t2, 0x2858($s6) -/* B56EF0 800DFD50 A6CB285A */ sh $t3, 0x285a($s6) -/* B56EF4 800DFD54 3C048017 */ lui $a0, %hi(gAudioContext+0x3408) -/* B56EF8 800DFD58 24842588 */ addiu $a0, %lo(gAudioContext+0x3408) # addiu $a0, $a0, 0x2588 -/* B56EFC 800DFD5C E6C8286C */ swc1 $f8, 0x286c($s6) -/* B56F00 800DFD60 46009183 */ div.s $f6, $f18, $f0 -/* B56F04 800DFD64 E6CA2860 */ swc1 $f10, 0x2860($s6) -/* B56F08 800DFD68 44815000 */ mtc1 $at, $f10 -/* B56F0C 800DFD6C 00000000 */ nop -/* B56F10 800DFD70 46005403 */ div.s $f16, $f10, $f0 -/* B56F14 800DFD74 E6C62868 */ swc1 $f6, 0x2868($s6) -/* B56F18 800DFD78 E6D02864 */ swc1 $f16, 0x2864($s6) -/* B56F1C 800DFD7C 950C0010 */ lhu $t4, 0x10($t0) -/* B56F20 800DFD80 AECC2874 */ sw $t4, 0x2874($s6) -/* B56F24 800DFD84 950D0012 */ lhu $t5, 0x12($t0) -/* B56F28 800DFD88 AECD2878 */ sw $t5, 0x2878($s6) -/* B56F2C 800DFD8C 910E0005 */ lbu $t6, 5($t0) -/* B56F30 800DFD90 AECE2894 */ sw $t6, 0x2894($s6) -/* B56F34 800DFD94 910F0006 */ lbu $t7, 6($t0) -/* B56F38 800DFD98 A6CF285C */ sh $t7, 0x285c($s6) -/* B56F3C 800DFD9C 86D8285C */ lh $t8, 0x285c($s6) -/* B56F40 800DFDA0 2B010005 */ slti $at, $t8, 5 -/* B56F44 800DFDA4 14200002 */ bnez $at, .L800DFDB0 -/* B56F48 800DFDA8 24190004 */ li $t9, 4 -/* B56F4C 800DFDAC A6D9285C */ sh $t9, 0x285c($s6) -.L800DFDB0: -/* B56F50 800DFDB0 950A0014 */ lhu $t2, 0x14($t0) -/* B56F54 800DFDB4 3C0B8015 */ lui $t3, %hi(gTatumsPerBeat) # $t3, 0x8015 -/* B56F58 800DFDB8 3C018015 */ lui $at, %hi(D_80149410) -/* B56F5C 800DFDBC A6CA0002 */ sh $t2, 2($s6) -/* B56F60 800DFDC0 856BA6C2 */ lh $t3, %lo(gTatumsPerBeat)($t3) -/* B56F64 800DFDC4 C4329410 */ lwc1 $f18, %lo(D_80149410)($at) -/* B56F68 800DFDC8 C6D02960 */ lwc1 $f16, 0x2960($s6) -/* B56F6C 800DFDCC 448B2000 */ mtc1 $t3, $f4 -/* B56F70 800DFDD0 46120182 */ mul.s $f6, $f0, $f18 -/* B56F74 800DFDD4 240D0001 */ li $t5, 1 -/* B56F78 800DFDD8 46802220 */ cvt.s.w $f8, $f4 -/* B56F7C 800DFDDC 46083283 */ div.s $f10, $f6, $f8 -/* B56F80 800DFDE0 46105483 */ div.s $f18, $f10, $f16 -/* B56F84 800DFDE4 444CF800 */ cfc1 $t4, $31 -/* B56F88 800DFDE8 44CDF800 */ ctc1 $t5, $31 -/* B56F8C 800DFDEC 00000000 */ nop -/* B56F90 800DFDF0 46009124 */ cvt.w.s $f4, $f18 -/* B56F94 800DFDF4 444DF800 */ cfc1 $t5, $31 -/* B56F98 800DFDF8 00000000 */ nop -/* B56F9C 800DFDFC 31AD0078 */ andi $t5, $t5, 0x78 -/* B56FA0 800DFE00 11A00012 */ beqz $t5, .L800DFE4C -/* B56FA4 800DFE04 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* B56FA8 800DFE08 44812000 */ mtc1 $at, $f4 -/* B56FAC 800DFE0C 240D0001 */ li $t5, 1 -/* B56FB0 800DFE10 46049101 */ sub.s $f4, $f18, $f4 -/* B56FB4 800DFE14 44CDF800 */ ctc1 $t5, $31 -/* B56FB8 800DFE18 00000000 */ nop -/* B56FBC 800DFE1C 46002124 */ cvt.w.s $f4, $f4 -/* B56FC0 800DFE20 444DF800 */ cfc1 $t5, $31 -/* B56FC4 800DFE24 00000000 */ nop -/* B56FC8 800DFE28 31AD0078 */ andi $t5, $t5, 0x78 -/* B56FCC 800DFE2C 15A00005 */ bnez $t5, .L800DFE44 -/* B56FD0 800DFE30 00000000 */ nop -/* B56FD4 800DFE34 440D2000 */ mfc1 $t5, $f4 -/* B56FD8 800DFE38 3C018000 */ li $at, 0x80000000 # 0.000000 -/* B56FDC 800DFE3C 10000007 */ b .L800DFE5C -/* B56FE0 800DFE40 01A16825 */ or $t5, $t5, $at -.L800DFE44: -/* B56FE4 800DFE44 10000005 */ b .L800DFE5C -/* B56FE8 800DFE48 240DFFFF */ li $t5, -1 -.L800DFE4C: -/* B56FEC 800DFE4C 440D2000 */ mfc1 $t5, $f4 -/* B56FF0 800DFE50 00000000 */ nop -/* B56FF4 800DFE54 05A0FFFB */ bltz $t5, .L800DFE44 -/* B56FF8 800DFE58 00000000 */ nop -.L800DFE5C: -/* B56FFC 800DFE5C 44CCF800 */ ctc1 $t4, $31 -/* B57000 800DFE60 44893000 */ mtc1 $t1, $f6 -/* B57004 800DFE64 96CE284C */ lhu $t6, 0x284c($s6) -/* B57008 800DFE68 A6CD2898 */ sh $t5, 0x2898($s6) -/* B5700C 800DFE6C 46803220 */ cvt.s.w $f8, $f6 -/* B57010 800DFE70 448E2000 */ mtc1 $t6, $f4 -/* B57014 800DFE74 00000000 */ nop -/* B57018 800DFE78 468021A0 */ cvt.s.w $f6, $f4 -/* B5701C 800DFE7C E6C82870 */ swc1 $f8, 0x2870($s6) -/* B57020 800DFE80 C6CA2870 */ lwc1 $f10, 0x2870($s6) -/* B57024 800DFE84 46005402 */ mul.s $f16, $f10, $f0 -/* B57028 800DFE88 E6D02870 */ swc1 $f16, 0x2870($s6) -/* B5702C 800DFE8C 05C10005 */ bgez $t6, .L800DFEA4 -/* B57030 800DFE90 C6D22870 */ lwc1 $f18, 0x2870($s6) -/* B57034 800DFE94 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* B57038 800DFE98 44814000 */ mtc1 $at, $f8 -/* B5703C 800DFE9C 00000000 */ nop -/* B57040 800DFEA0 46083180 */ add.s $f6, $f6, $f8 -.L800DFEA4: -/* B57044 800DFEA4 46069283 */ div.s $f10, $f18, $f6 -/* B57048 800DFEA8 86CF2898 */ lh $t7, 0x2898($s6) -/* B5704C 800DFEAC 86CA2850 */ lh $t2, 0x2850($s6) -/* B57050 800DFEB0 86CC2852 */ lh $t4, 0x2852($s6) -/* B57054 800DFEB4 448F2000 */ mtc1 $t7, $f4 -/* B57058 800DFEB8 00000000 */ nop -/* B5705C 800DFEBC 46802220 */ cvt.s.w $f8, $f4 -/* B57060 800DFEC0 E6CA2870 */ swc1 $f10, 0x2870($s6) -/* B57064 800DFEC4 C6D02870 */ lwc1 $f16, 0x2870($s6) -/* B57068 800DFEC8 46088483 */ div.s $f18, $f16, $f8 -/* B5706C 800DFECC E6D22870 */ swc1 $f18, 0x2870($s6) -/* B57070 800DFED0 91180004 */ lbu $t8, 4($t0) -/* B57074 800DFED4 A6D82848 */ sh $t8, 0x2848($s6) -/* B57078 800DFED8 86C22848 */ lh $v0, 0x2848($s6) -/* B5707C 800DFEDC 00C20019 */ multu $a2, $v0 -/* B57080 800DFEE0 28410002 */ slti $at, $v0, 2 -/* B57084 800DFEE4 0000C812 */ mflo $t9 -/* B57088 800DFEE8 A6D9284E */ sh $t9, 0x284e($s6) -/* B5708C 800DFEEC 00000000 */ nop -/* B57090 800DFEF0 01420019 */ multu $t2, $v0 -/* B57094 800DFEF4 00005812 */ mflo $t3 -/* B57098 800DFEF8 A6CB2850 */ sh $t3, 0x2850($s6) -/* B5709C 800DFEFC 00000000 */ nop -/* B570A0 800DFF00 01820019 */ multu $t4, $v0 -/* B570A4 800DFF04 00006812 */ mflo $t5 -/* B570A8 800DFF08 A6CD2852 */ sh $t5, 0x2852($s6) -/* B570AC 800DFF0C 00000000 */ nop -/* B570B0 800DFF10 00E20019 */ multu $a3, $v0 -/* B570B4 800DFF14 00007012 */ mflo $t6 -/* B570B8 800DFF18 A6CE2854 */ sh $t6, 0x2854($s6) -/* B570BC 800DFF1C 54200005 */ bnezl $at, .L800DFF34 -/* B570C0 800DFF20 8ED92894 */ lw $t9, 0x2894($s6) -/* B570C4 800DFF24 86CF2850 */ lh $t7, 0x2850($s6) -/* B570C8 800DFF28 25F8FFF0 */ addiu $t8, $t7, -0x10 -/* B570CC 800DFF2C A6D82850 */ sh $t8, 0x2850($s6) -/* B570D0 800DFF30 8ED92894 */ lw $t9, 0x2894($s6) -.L800DFF34: -/* B570D4 800DFF34 86CB2854 */ lh $t3, 0x2854($s6) -/* B570D8 800DFF38 910D0009 */ lbu $t5, 9($t0) -/* B570DC 800DFF3C 00195100 */ sll $t2, $t9, 4 -/* B570E0 800DFF40 014B0019 */ multu $t2, $t3 -/* B570E4 800DFF44 000D7080 */ sll $t6, $t5, 2 -/* B570E8 800DFF48 01CD7023 */ subu $t6, $t6, $t5 -/* B570EC 800DFF4C 000E70C0 */ sll $t6, $t6, 3 -/* B570F0 800DFF50 8EC329A0 */ lw $v1, 0x29a0($s6) -/* B570F4 800DFF54 3C018017 */ lui $at, %hi(gAudioContext+0x3414) # $at, 0x8017 -/* B570F8 800DFF58 00006012 */ mflo $t4 -/* B570FC 800DFF5C 018E7821 */ addu $t7, $t4, $t6 -/* B57100 800DFF60 25F80140 */ addiu $t8, $t7, 0x140 -/* B57104 800DFF64 AED82890 */ sw $t8, 0x2890($s6) -/* B57108 800DFF68 8D0A001C */ lw $t2, 0x1c($t0) -/* B5710C 800DFF6C 8D190018 */ lw $t9, 0x18($t0) -/* B57110 800DFF70 8D0E0028 */ lw $t6, 0x28($t0) -/* B57114 800DFF74 8D0C0024 */ lw $t4, 0x24($t0) -/* B57118 800DFF78 8D0D0020 */ lw $t5, 0x20($t0) -/* B5711C 800DFF7C 8D18002C */ lw $t8, 0x2c($t0) -/* B57120 800DFF80 032A5821 */ addu $t3, $t9, $t2 -/* B57124 800DFF84 018E7821 */ addu $t7, $t4, $t6 -/* B57128 800DFF88 8ED92998 */ lw $t9, 0x2998($s6) -/* B5712C 800DFF8C 016D8021 */ addu $s0, $t3, $t5 -/* B57130 800DFF90 01F88821 */ addu $s1, $t7, $t8 -/* B57134 800DFF94 26100010 */ addiu $s0, $s0, 0x10 -/* B57138 800DFF98 26310010 */ addiu $s1, $s1, 0x10 -/* B5713C 800DFF9C 02111021 */ addu $v0, $s0, $s1 -/* B57140 800DFFA0 03222823 */ subu $a1, $t9, $v0 -/* B57144 800DFFA4 10600002 */ beqz $v1, .L800DFFB0 -/* B57148 800DFFA8 24A5FF00 */ addiu $a1, $a1, -0x100 -/* B5714C 800DFFAC AEC329A4 */ sw $v1, 0x29a4($s6) -.L800DFFB0: -/* B57150 800DFFB0 AEC53408 */ sw $a1, 0x3408($s6) -/* B57154 800DFFB4 0C037994 */ jal Audio_SessionPoolsInit -/* B57158 800DFFB8 AC222594 */ sw $v0, %lo(gAudioContext+0x3414)($at) -/* B5715C 800DFFBC 3C048017 */ lui $a0, %hi(gAudioContext+0x3418) # $a0, 0x8017 -/* B57160 800DFFC0 AED03418 */ sw $s0, 0x3418($s6) -/* B57164 800DFFC4 AED1341C */ sw $s1, 0x341c($s6) -/* B57168 800DFFC8 0C0379B5 */ jal Audio_SeqAndBankPoolInit -/* B5716C 800DFFCC 24842598 */ addiu $a0, %lo(gAudioContext+0x3418) # addiu $a0, $a0, 0x2598 -/* B57170 800DFFD0 8FA20068 */ lw $v0, 0x68($sp) -/* B57174 800DFFD4 3C048017 */ lui $a0, %hi(gAudioContext+0x3420) # $a0, 0x8017 -/* B57178 800DFFD8 248425A0 */ addiu $a0, %lo(gAudioContext+0x3420) # addiu $a0, $a0, 0x25a0 -/* B5717C 800DFFDC 8C4A0018 */ lw $t2, 0x18($v0) -/* B57180 800DFFE0 AECA3420 */ sw $t2, 0x3420($s6) -/* B57184 800DFFE4 8C4B001C */ lw $t3, 0x1c($v0) -/* B57188 800DFFE8 AECB3424 */ sw $t3, 0x3424($s6) -/* B5718C 800DFFEC 8C4D0020 */ lw $t5, 0x20($v0) -/* B57190 800DFFF0 0C0379D6 */ jal Audio_PersistentPoolsInit -/* B57194 800DFFF4 AECD3428 */ sw $t5, 0x3428($s6) -/* B57198 800DFFF8 8FA20068 */ lw $v0, 0x68($sp) -/* B5719C 800DFFFC 3C048017 */ lui $a0, %hi(gAudioContext+0x342c) # $a0, 0x8017 -/* B571A0 800E0000 248425AC */ addiu $a0, %lo(gAudioContext+0x342c) # addiu $a0, $a0, 0x25ac -/* B571A4 800E0004 8C4C0024 */ lw $t4, 0x24($v0) -/* B571A8 800E0008 AECC342C */ sw $t4, 0x342c($s6) -/* B571AC 800E000C 8C4E0028 */ lw $t6, 0x28($v0) -/* B571B0 800E0010 AECE3430 */ sw $t6, 0x3430($s6) -/* B571B4 800E0014 8C4F002C */ lw $t7, 0x2c($v0) -/* B571B8 800E0018 0C037A07 */ jal Audio_TemporaryPoolsInit -/* B571BC 800E001C AECF3434 */ sw $t7, 0x3434($s6) -/* B571C0 800E0020 0C0377E0 */ jal Audio_ResetLoadStatus -/* B571C4 800E0024 00000000 */ nop -/* B571C8 800E0028 8EC52894 */ lw $a1, 0x2894($s6) -/* B571CC 800E002C 3C138017 */ lui $s3, %hi(gAudioContext+0x29c0) # $s3, 0x8017 -/* B571D0 800E0030 26731B40 */ addiu $s3, %lo(gAudioContext+0x29c0) # addiu $s3, $s3, 0x1b40 -/* B571D4 800E0034 00A00821 */ addu $at, $a1, $zero -/* B571D8 800E0038 000528C0 */ sll $a1, $a1, 3 -/* B571DC 800E003C 00A12823 */ subu $a1, $a1, $at -/* B571E0 800E0040 00052940 */ sll $a1, $a1, 5 -/* B571E4 800E0044 0C0378E0 */ jal Audio_AllocZeroed -/* B571E8 800E0048 02602025 */ move $a0, $s3 -/* B571EC 800E004C 0C03A1E2 */ jal Audio_NoteInitAll -/* B571F0 800E0050 AEC2352C */ sw $v0, 0x352c($s6) -/* B571F4 800E0054 0C039F57 */ jal Audio_InitNoteFreeList -/* B571F8 800E0058 00000000 */ nop -/* B571FC 800E005C 86D82854 */ lh $t8, 0x2854($s6) -/* B57200 800E0060 8ED92894 */ lw $t9, 0x2894($s6) -/* B57204 800E0064 02602025 */ move $a0, $s3 -/* B57208 800E0068 03190019 */ multu $t8, $t9 -/* B5720C 800E006C 00002812 */ mflo $a1 -/* B57210 800E0070 00052940 */ sll $a1, $a1, 5 -/* B57214 800E0074 0C0378E0 */ jal Audio_AllocZeroed -/* B57218 800E0078 00000000 */ nop -/* B5721C 800E007C 3C108017 */ lui $s0, %hi(gAudioContext) # $s0, 0x8017 -/* B57220 800E0080 3C118017 */ lui $s1, %hi(gAudioContext+0x8) # $s1, 0x8017 -/* B57224 800E0084 AEC20014 */ sw $v0, 0x14($s6) -/* B57228 800E0088 2631F188 */ addiu $s1, %lo(gAudioContext+0x8) # addiu $s1, $s1, -0xe78 -/* B5722C 800E008C 2610F180 */ addiu $s0, %lo(gAudioContext) # addiu $s0, $s0, -0xe80 -.L800E0090: -/* B57230 800E0090 8EC52890 */ lw $a1, 0x2890($s6) -/* B57234 800E0094 02602025 */ move $a0, $s3 -/* B57238 800E0098 0C0378D1 */ jal Audio_AllocDmaMemoryZeroed -/* B5723C 800E009C 000528C0 */ sll $a1, $a1, 3 -/* B57240 800E00A0 26100004 */ addiu $s0, $s0, 4 -/* B57244 800E00A4 1611FFFA */ bne $s0, $s1, .L800E0090 -/* B57248 800E00A8 AE0228A8 */ sw $v0, 0x28a8($s0) -/* B5724C 800E00AC 02602025 */ move $a0, $s3 -/* B57250 800E00B0 0C0378F7 */ jal Audio_Alloc -/* B57254 800E00B4 24050400 */ li $a1, 1024 -/* B57258 800E00B8 0C03778F */ jal func_800DDE3C -/* B5725C 800E00BC AEC23520 */ sw $v0, 0x3520($s6) -/* B57260 800E00C0 3C148017 */ lui $s4, %hi(gAudioContext) # $s4, 0x8017 -/* B57264 800E00C4 3C028017 */ lui $v0, %hi(gAudioContext+0xb20) # $v0, 0x8017 -/* B57268 800E00C8 2442FCA0 */ addiu $v0, %lo(gAudioContext+0xb20) # addiu $v0, $v0, -0x360 -/* B5726C 800E00CC 2694F180 */ addiu $s4, %lo(gAudioContext) # addiu $s4, $s4, -0xe80 -.L800E00D0: -/* B57270 800E00D0 269402C8 */ addiu $s4, $s4, 0x2c8 -/* B57274 800E00D4 0282082B */ sltu $at, $s4, $v0 -/* B57278 800E00D8 1420FFFD */ bnez $at, .L800E00D0 -/* B5727C 800E00DC A280FD51 */ sb $zero, -0x2af($s4) -/* B57280 800E00E0 8FA20068 */ lw $v0, 0x68($sp) -/* B57284 800E00E4 904A0009 */ lbu $t2, 9($v0) -/* B57288 800E00E8 AFA00074 */ sw $zero, 0x74($sp) -/* B5728C 800E00EC A2CA0001 */ sb $t2, 1($s6) -/* B57290 800E00F0 82CB0001 */ lb $t3, 1($s6) -/* B57294 800E00F4 196000CA */ blez $t3, .L800E0420 -/* B57298 800E00F8 3C0D8017 */ lui $t5, %hi(gAudioContext+0x2b0) # $t5, 0x8017 -/* B5729C 800E00FC 25ADF430 */ addiu $t5, %lo(gAudioContext+0x2b0) # addiu $t5, $t5, -0xbd0 -/* B572A0 800E0100 3C148017 */ lui $s4, %hi(gAudioContext) # $s4, 0x8017 -/* B572A4 800E0104 3C128017 */ lui $s2, %hi(gAudioContext+0x18) # $s2, 0x8017 -/* B572A8 800E0108 3C1E8017 */ lui $fp, %hi(gAudioContext+0x2a0) # $fp, 0x8017 -/* B572AC 800E010C 27DEF420 */ addiu $fp, %lo(gAudioContext+0x2a0) # addiu $fp, $fp, -0xbe0 -/* B572B0 800E0110 2652F198 */ addiu $s2, %lo(gAudioContext+0x18) # addiu $s2, $s2, -0xe68 -/* B572B4 800E0114 2694F180 */ addiu $s4, %lo(gAudioContext) # addiu $s4, $s4, -0xe80 -/* B572B8 800E0118 AFAD0044 */ sw $t5, 0x44($sp) -/* B572BC 800E011C 0000B825 */ move $s7, $zero -.L800E0120: -/* B572C0 800E0120 8FA20068 */ lw $v0, 0x68($sp) -/* B572C4 800E0124 02602025 */ move $a0, $s3 -/* B572C8 800E0128 8C4C000C */ lw $t4, 0xc($v0) -/* B572CC 800E012C 0197A821 */ addu $s5, $t4, $s7 -/* B572D0 800E0130 92AE0000 */ lbu $t6, ($s5) -/* B572D4 800E0134 A28E001C */ sb $t6, 0x1c($s4) -/* B572D8 800E0138 96AF0002 */ lhu $t7, 2($s5) -/* B572DC 800E013C 31CA00FF */ andi $t2, $t6, 0xff -/* B572E0 800E0140 000FC180 */ sll $t8, $t7, 6 -/* B572E4 800E0144 3319FFFF */ andi $t9, $t8, 0xffff -/* B572E8 800E0148 032A001A */ div $zero, $t9, $t2 -/* B572EC 800E014C A698001E */ sh $t8, 0x1e($s4) -/* B572F0 800E0150 00005812 */ mflo $t3 -/* B572F4 800E0154 A68B001E */ sh $t3, 0x1e($s4) -/* B572F8 800E0158 96AD0004 */ lhu $t5, 4($s5) -/* B572FC 800E015C 15400002 */ bnez $t2, .L800E0168 -/* B57300 800E0160 00000000 */ nop -/* B57304 800E0164 0007000D */ break 7 -.L800E0168: -/* B57308 800E0168 2401FFFF */ li $at, -1 -/* B5730C 800E016C 15410004 */ bne $t2, $at, .L800E0180 -/* B57310 800E0170 3C018000 */ lui $at, 0x8000 -/* B57314 800E0174 17210002 */ bne $t9, $at, .L800E0180 -/* B57318 800E0178 00000000 */ nop -/* B5731C 800E017C 0006000D */ break 6 -.L800E0180: -/* B57320 800E0180 A68D0024 */ sh $t5, 0x24($s4) -/* B57324 800E0184 96AC000A */ lhu $t4, 0xa($s5) -/* B57328 800E0188 9685001E */ lhu $a1, 0x1e($s4) -/* B5732C 800E018C A68C0022 */ sh $t4, 0x22($s4) -/* B57330 800E0190 96AE0006 */ lhu $t6, 6($s5) -/* B57334 800E0194 240C0008 */ li $t4, 8 -/* B57338 800E0198 00052840 */ sll $a1, $a1, 1 -/* B5733C 800E019C 000E7980 */ sll $t7, $t6, 6 -/* B57340 800E01A0 A68F002C */ sh $t7, 0x2c($s4) -/* B57344 800E01A4 96B80008 */ lhu $t8, 8($s5) -/* B57348 800E01A8 A2800030 */ sb $zero, 0x30($s4) -/* B5734C 800E01AC A698002E */ sh $t8, 0x2e($s4) -/* B57350 800E01B0 96B9000C */ lhu $t9, 0xc($s5) -/* B57354 800E01B4 A6990028 */ sh $t9, 0x28($s4) -/* B57358 800E01B8 96AA000E */ lhu $t2, 0xe($s5) -/* B5735C 800E01BC A68A002A */ sh $t2, 0x2a($s4) -/* B57360 800E01C0 82AB0010 */ lb $t3, 0x10($s5) -/* B57364 800E01C4 A28B001D */ sb $t3, 0x1d($s4) -/* B57368 800E01C8 96AD0012 */ lhu $t5, 0x12($s5) -/* B5736C 800E01CC A28C0019 */ sb $t4, 0x19($s4) -/* B57370 800E01D0 0C037896 */ jal func_800DE258 -/* B57374 800E01D4 A68D0020 */ sh $t5, 0x20($s4) -/* B57378 800E01D8 96450006 */ lhu $a1, 6($s2) -/* B5737C 800E01DC AE420028 */ sw $v0, 0x28($s2) -/* B57380 800E01E0 02602025 */ move $a0, $s3 -/* B57384 800E01E4 0C037896 */ jal func_800DE258 -/* B57388 800E01E8 00052840 */ sll $a1, $a1, 1 -/* B5738C 800E01EC 92590288 */ lbu $t9, 0x288($s2) -/* B57390 800E01F0 96450006 */ lhu $a1, 6($s2) -/* B57394 800E01F4 240E0002 */ li $t6, 2 -/* B57398 800E01F8 240F0001 */ li $t7, 1 -/* B5739C 800E01FC 332AFF0F */ andi $t2, $t9, 0xff0f -/* B573A0 800E0200 AE42002C */ sw $v0, 0x2c($s2) -/* B573A4 800E0204 AE40001C */ sw $zero, 0x1c($s2) -/* B573A8 800E0208 AE400020 */ sw $zero, 0x20($s2) -/* B573AC 800E020C A2400003 */ sb $zero, 3($s2) -/* B573B0 800E0210 A24E0002 */ sb $t6, 2($s2) -/* B573B4 800E0214 A24F0000 */ sb $t7, ($s2) -/* B573B8 800E0218 AE5E0280 */ sw $fp, 0x280($s2) -/* B573BC 800E021C 354D0040 */ ori $t5, $t2, 0x40 -/* B573C0 800E0220 AE450024 */ sw $a1, 0x24($s2) -/* B573C4 800E0224 8FB80044 */ lw $t8, 0x44($sp) -/* B573C8 800E0228 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B573CC 800E022C A24D0288 */ sb $t5, 0x288($s2) -/* B573D0 800E0230 31AC00F3 */ andi $t4, $t5, 0xf3 -/* B573D4 800E0234 44813000 */ mtc1 $at, $f6 -/* B573D8 800E0238 A24C0288 */ sb $t4, 0x288($s2) -/* B573DC 800E023C 8E440288 */ lw $a0, 0x288($s2) -/* B573E0 800E0240 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* B573E4 800E0244 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* B573E8 800E0248 00057040 */ sll $t6, $a1, 1 -/* B573EC 800E024C 01C17824 */ and $t7, $t6, $at -/* B573F0 800E0250 AE580290 */ sw $t8, 0x290($s2) -/* B573F4 800E0254 01E4C026 */ xor $t8, $t7, $a0 -/* B573F8 800E0258 92420004 */ lbu $v0, 4($s2) -/* B573FC 800E025C 0018CA00 */ sll $t9, $t8, 8 -/* B57400 800E0260 8E4D0028 */ lw $t5, 0x28($s2) -/* B57404 800E0264 00195202 */ srl $t2, $t9, 8 -/* B57408 800E0268 240C0001 */ li $t4, 1 -/* B5740C 800E026C 24010001 */ li $at, 1 -/* B57410 800E0270 01445826 */ xor $t3, $t2, $a0 -/* B57414 800E0274 AE4B0288 */ sw $t3, 0x288($s2) -/* B57418 800E0278 AE400298 */ sw $zero, 0x298($s2) -/* B5741C 800E027C AE4C02A0 */ sw $t4, 0x2a0($s2) -/* B57420 800E0280 00A01825 */ move $v1, $a1 -/* B57424 800E0284 AE45029C */ sw $a1, 0x29c($s2) -/* B57428 800E0288 E6460284 */ swc1 $f6, 0x284($s2) -/* B5742C 800E028C 10410035 */ beq $v0, $at, .L800E0364 -/* B57430 800E0290 AE4D028C */ sw $t5, 0x28c($s2) -/* B57434 800E0294 340E8000 */ li $t6, 32768 -/* B57438 800E0298 01C2001A */ div $zero, $t6, $v0 -/* B5743C 800E029C 00007812 */ mflo $t7 -/* B57440 800E02A0 A64F000E */ sh $t7, 0xe($s2) -/* B57444 800E02A4 14400002 */ bnez $v0, .L800E02B0 -/* B57448 800E02A8 00000000 */ nop -/* B5744C 800E02AC 0007000D */ break 7 -.L800E02B0: -/* B57450 800E02B0 2401FFFF */ li $at, -1 -/* B57454 800E02B4 14410004 */ bne $v0, $at, .L800E02C8 -/* B57458 800E02B8 3C018000 */ lui $at, 0x8000 -/* B5745C 800E02BC 15C10002 */ bne $t6, $at, .L800E02C8 -/* B57460 800E02C0 00000000 */ nop -/* B57464 800E02C4 0006000D */ break 6 -.L800E02C8: -/* B57468 800E02C8 02602025 */ move $a0, $s3 -/* B5746C 800E02CC 24050020 */ li $a1, 32 -/* B57470 800E02D0 0C0378E0 */ jal Audio_AllocZeroed -/* B57474 800E02D4 00008825 */ move $s1, $zero -/* B57478 800E02D8 AE420030 */ sw $v0, 0x30($s2) -/* B5747C 800E02DC 02602025 */ move $a0, $s3 -/* B57480 800E02E0 0C0378E0 */ jal Audio_AllocZeroed -/* B57484 800E02E4 24050020 */ li $a1, 32 -/* B57488 800E02E8 AE420034 */ sw $v0, 0x34($s2) -/* B5748C 800E02EC 02602025 */ move $a0, $s3 -/* B57490 800E02F0 0C0378E0 */ jal Audio_AllocZeroed -/* B57494 800E02F4 24050020 */ li $a1, 32 -/* B57498 800E02F8 AE420038 */ sw $v0, 0x38($s2) -/* B5749C 800E02FC 02602025 */ move $a0, $s3 -/* B574A0 800E0300 0C0378E0 */ jal Audio_AllocZeroed -/* B574A4 800E0304 24050020 */ li $a1, 32 -/* B574A8 800E0308 AE42003C */ sw $v0, 0x3c($s2) -/* B574AC 800E030C 86D82854 */ lh $t8, 0x2854($s6) -/* B574B0 800E0310 5B000015 */ blezl $t8, .L800E0368 -/* B574B4 800E0314 86AD0014 */ lh $t5, 0x14($s5) -/* B574B8 800E0318 02408025 */ move $s0, $s2 -/* B574BC 800E031C 02602025 */ move $a0, $s3 -.L800E0320: -/* B574C0 800E0320 0C037896 */ jal func_800DE258 -/* B574C4 800E0324 24050340 */ li $a1, 832 -/* B574C8 800E0328 245901A0 */ addiu $t9, $v0, 0x1a0 -/* B574CC 800E032C AE020044 */ sw $v0, 0x44($s0) -/* B574D0 800E0330 AE190048 */ sw $t9, 0x48($s0) -/* B574D4 800E0334 02602025 */ move $a0, $s3 -/* B574D8 800E0338 0C037896 */ jal func_800DE258 -/* B574DC 800E033C 24050340 */ li $a1, 832 -/* B574E0 800E0340 244A01A0 */ addiu $t2, $v0, 0x1a0 -/* B574E4 800E0344 AE0200D0 */ sw $v0, 0xd0($s0) -/* B574E8 800E0348 AE0A00D4 */ sw $t2, 0xd4($s0) -/* B574EC 800E034C 86CB2854 */ lh $t3, 0x2854($s6) -/* B574F0 800E0350 26310001 */ addiu $s1, $s1, 1 -/* B574F4 800E0354 2610001C */ addiu $s0, $s0, 0x1c -/* B574F8 800E0358 022B082A */ slt $at, $s1, $t3 -/* B574FC 800E035C 5420FFF0 */ bnezl $at, .L800E0320 -/* B57500 800E0360 02602025 */ move $a0, $s3 -.L800E0364: -/* B57504 800E0364 86AD0014 */ lh $t5, 0x14($s5) -.L800E0368: -/* B57508 800E0368 51A0000F */ beql $t5, $zero, .L800E03A8 -/* B5750C 800E036C AE400270 */ sw $zero, 0x270($s2) -/* B57510 800E0370 02602025 */ move $a0, $s3 -/* B57514 800E0374 0C0378D1 */ jal Audio_AllocDmaMemoryZeroed -/* B57518 800E0378 24050040 */ li $a1, 64 -/* B5751C 800E037C AE420278 */ sw $v0, 0x278($s2) -/* B57520 800E0380 02602025 */ move $a0, $s3 -/* B57524 800E0384 0C0378C2 */ jal Audio_AllocDmaMemory -/* B57528 800E0388 24050010 */ li $a1, 16 -/* B5752C 800E038C AE420270 */ sw $v0, 0x270($s2) -/* B57530 800E0390 86A50014 */ lh $a1, 0x14($s5) -/* B57534 800E0394 0C037D77 */ jal func_800DF5DC -/* B57538 800E0398 00402025 */ move $a0, $v0 -/* B5753C 800E039C 10000003 */ b .L800E03AC -/* B57540 800E03A0 86AC0016 */ lh $t4, 0x16($s5) -/* B57544 800E03A4 AE400270 */ sw $zero, 0x270($s2) -.L800E03A8: -/* B57548 800E03A8 86AC0016 */ lh $t4, 0x16($s5) -.L800E03AC: -/* B5754C 800E03AC 5180000F */ beql $t4, $zero, .L800E03EC -/* B57550 800E03B0 AE400274 */ sw $zero, 0x274($s2) -/* B57554 800E03B4 02602025 */ move $a0, $s3 -/* B57558 800E03B8 0C0378D1 */ jal Audio_AllocDmaMemoryZeroed -/* B5755C 800E03BC 24050040 */ li $a1, 64 -/* B57560 800E03C0 AE42027C */ sw $v0, 0x27c($s2) -/* B57564 800E03C4 02602025 */ move $a0, $s3 -/* B57568 800E03C8 0C0378C2 */ jal Audio_AllocDmaMemory -/* B5756C 800E03CC 24050010 */ li $a1, 16 -/* B57570 800E03D0 AE420274 */ sw $v0, 0x274($s2) -/* B57574 800E03D4 86A50016 */ lh $a1, 0x16($s5) -/* B57578 800E03D8 0C037D77 */ jal func_800DF5DC -/* B5757C 800E03DC 00402025 */ move $a0, $v0 -/* B57580 800E03E0 10000003 */ b .L800E03F0 -/* B57584 800E03E4 8FA20074 */ lw $v0, 0x74($sp) -/* B57588 800E03E8 AE400274 */ sw $zero, 0x274($s2) -.L800E03EC: -/* B5758C 800E03EC 8FA20074 */ lw $v0, 0x74($sp) -.L800E03F0: -/* B57590 800E03F0 8FAE0044 */ lw $t6, 0x44($sp) -/* B57594 800E03F4 82D80001 */ lb $t8, 1($s6) -/* B57598 800E03F8 24420001 */ addiu $v0, $v0, 1 -/* B5759C 800E03FC 25CF02C8 */ addiu $t7, $t6, 0x2c8 -/* B575A0 800E0400 0058082A */ slt $at, $v0, $t8 -/* B575A4 800E0404 AFAF0044 */ sw $t7, 0x44($sp) -/* B575A8 800E0408 AFA20074 */ sw $v0, 0x74($sp) -/* B575AC 800E040C 269402C8 */ addiu $s4, $s4, 0x2c8 -/* B575B0 800E0410 26F70018 */ addiu $s7, $s7, 0x18 -/* B575B4 800E0414 265202C8 */ addiu $s2, $s2, 0x2c8 -/* B575B8 800E0418 1420FF41 */ bnez $at, .L800E0120 -/* B575BC 800E041C 27DE02C8 */ addiu $fp, $fp, 0x2c8 -.L800E0420: -/* B575C0 800E0420 0C03B237 */ jal Audio_InitSequencePlayers -/* B575C4 800E0424 00008825 */ move $s1, $zero -/* B575C8 800E0428 86D9285C */ lh $t9, 0x285c($s6) -/* B575CC 800E042C 3C108017 */ lui $s0, %hi(gAudioContext+0x3530) # $s0, 0x8017 -/* B575D0 800E0430 261026B0 */ addiu $s0, %lo(gAudioContext+0x3530) # addiu $s0, $s0, 0x26b0 -/* B575D4 800E0434 5B20000C */ blezl $t9, .L800E0468 -/* B575D8 800E0438 8FAB0068 */ lw $t3, 0x68($sp) -.L800E043C: -/* B575DC 800E043C 0C03B1CD */ jal func_800EC734 -/* B575E0 800E0440 02202025 */ move $a0, $s1 -/* B575E4 800E0444 0C03B19A */ jal Audio_ResetSequencePlayer -/* B575E8 800E0448 02002025 */ move $a0, $s0 -/* B575EC 800E044C 86CA285C */ lh $t2, 0x285c($s6) -/* B575F0 800E0450 26310001 */ addiu $s1, $s1, 1 -/* B575F4 800E0454 26100160 */ addiu $s0, $s0, 0x160 -/* B575F8 800E0458 022A082A */ slt $at, $s1, $t2 -/* B575FC 800E045C 1420FFF7 */ bnez $at, .L800E043C -/* B57600 800E0460 00000000 */ nop -/* B57604 800E0464 8FAB0068 */ lw $t3, 0x68($sp) -.L800E0468: -/* B57608 800E0468 8D640030 */ lw $a0, 0x30($t3) -/* B5760C 800E046C 0C03818D */ jal func_800E0634 -/* B57610 800E0470 8D650034 */ lw $a1, 0x34($t3) -/* B57614 800E0474 0C038586 */ jal func_800E1618 -/* B57618 800E0478 8EC42894 */ lw $a0, 0x2894($s6) -/* B5761C 800E047C 0C038D00 */ jal func_800E3400 -/* B57620 800E0480 AEC0176C */ sw $zero, 0x176c($s6) -/* B57624 800E0484 0C0393EC */ jal func_800E4FB0 -/* B57628 800E0488 00000000 */ nop -/* B5762C 800E048C 0C038E85 */ jal func_800E3A14 -/* B57630 800E0490 00000000 */ nop -/* B57634 800E0494 240D1000 */ li $t5, 4096 -/* B57638 800E0498 0C039365 */ jal func_800E4D94 -/* B5763C 800E049C A6CD0004 */ sh $t5, 4($s6) -/* B57640 800E04A0 0C0013D0 */ jal osSetIntMask -/* B57644 800E04A4 24040001 */ li $a0, 1 -/* B57648 800E04A8 0C041924 */ jal osWritebackDCacheAll -/* B5764C 800E04AC 00408025 */ move $s0, $v0 -/* B57650 800E04B0 0C0013D0 */ jal osSetIntMask -/* B57654 800E04B4 02002025 */ move $a0, $s0 -/* B57658 800E04B8 8FBF003C */ lw $ra, 0x3c($sp) -/* B5765C 800E04BC 8FB00018 */ lw $s0, 0x18($sp) -/* B57660 800E04C0 8FB1001C */ lw $s1, 0x1c($sp) -/* B57664 800E04C4 8FB20020 */ lw $s2, 0x20($sp) -/* B57668 800E04C8 8FB30024 */ lw $s3, 0x24($sp) -/* B5766C 800E04CC 8FB40028 */ lw $s4, 0x28($sp) -/* B57670 800E04D0 8FB5002C */ lw $s5, 0x2c($sp) -/* B57674 800E04D4 8FB60030 */ lw $s6, 0x30($sp) -/* B57678 800E04D8 8FB70034 */ lw $s7, 0x34($sp) -/* B5767C 800E04DC 8FBE0038 */ lw $fp, 0x38($sp) -/* B57680 800E04E0 03E00008 */ jr $ra -/* B57684 800E04E4 27BD00A0 */ addiu $sp, $sp, 0xa0 - diff --git a/src/code/audio_heap.c b/src/code/audio_heap.c index 9ecc9d29c3..ff221da46b 100644 --- a/src/code/audio_heap.c +++ b/src/code/audio_heap.c @@ -776,22 +776,19 @@ s32 Audio_ResetStep(void) { return 1; } -#ifdef NON_EQUIVALENT -// first half matches, reorderings and regalloc in second half void func_800DFBF8(void) { - s32 pad[6]; - s32 i; - s32 j; + s32 pad1[4]; s16* mem; - u16 windowSize; s32 persistentMem; s32 temporaryMem; s32 totalMem; - AudioSessionSettings* preset; s32 wantMisc; u32 intMask; + s32 i; + s32 j; + s32 pad2; + AudioSessionSettings* preset = &gAudioSessionPresets[gAudioContext.gAudioResetPresetIdToLoad]; - preset = &gAudioSessionPresets[gAudioContext.gAudioResetPresetIdToLoad]; gAudioContext.gSampleDmaNumListItems = 0; gAudioContext.gAudioBufferParameters.frequency = preset->frequency; gAudioContext.gAudioBufferParameters.aiFrequency = osAiSetFrequency(gAudioContext.gAudioBufferParameters.frequency); @@ -894,8 +891,8 @@ void func_800DFBF8(void) { gAudioContext.gNumSynthesisReverbs = preset->numReverbs; for (i = 0; i < gAudioContext.gNumSynthesisReverbs; i++) { - SynthesisReverb* reverb = &gAudioContext.gSynthesisReverbs[i]; ReverbSettings* settings = &preset->reverbSettings[i]; + SynthesisReverb* reverb = &gAudioContext.gSynthesisReverbs[i]; reverb->downsampleRate = settings->downsampleRate; reverb->windowSize = settings->windowSize * 64; reverb->windowSize /= reverb->downsampleRate; @@ -914,19 +911,19 @@ void func_800DFBF8(void) { reverb->unk_1C = 0; reverb->unk_20 = 0; reverb->unk_03 = 0; + reverb->unk_24 = reverb->windowSize; reverb->unk_02 = 2; reverb->unk_00 = 1; - reverb->unk_24 = reverb->windowSize; reverb->sound.sample = &reverb->sample; reverb->sample.loop = &reverb->loop; + reverb->sound.tuning = 1.0f; reverb->sample.bits4 = 4; reverb->sample.bits2 = 0; reverb->sample.bits24 = reverb->windowSize * 2; + reverb->sample.sampleAddr = (u8*)reverb->unk_28; reverb->loop.start = 0; reverb->loop.count = 1; reverb->loop.end = reverb->windowSize; - reverb->sound.tuning = 1.0f; - reverb->sample.sampleAddr = (u8*)reverb->unk_28; if (reverb->downsampleRate != 1) { reverb->unk_0E = 0x8000 / reverb->downsampleRate; @@ -934,7 +931,6 @@ void func_800DFBF8(void) { reverb->unk_34 = Audio_AllocZeroed(&gAudioContext.gNotesAndBuffersPool, 0x20); reverb->unk_38 = Audio_AllocZeroed(&gAudioContext.gNotesAndBuffersPool, 0x20); reverb->unk_3C = Audio_AllocZeroed(&gAudioContext.gNotesAndBuffersPool, 0x20); - reverb = reverb; for (j = 0; j < gAudioContext.gAudioBufferParameters.updatesPerFrame; j++) { mem = func_800DE258(&gAudioContext.gNotesAndBuffersPool, 0x340); reverb->items[0][j].toDownsampleLeft = mem; @@ -963,9 +959,9 @@ void func_800DFBF8(void) { } Audio_InitSequencePlayers(); - for (i = 0; i < gAudioContext.gAudioBufferParameters.numSequencePlayers; i++) { - func_800EC734(i); - Audio_ResetSequencePlayer(&gAudioContext.gSequencePlayers[i]); + for (j = 0; j < gAudioContext.gAudioBufferParameters.numSequencePlayers; j++) { + func_800EC734(j); + Audio_ResetSequencePlayer(&gAudioContext.gSequencePlayers[j]); } func_800E0634(preset->unk_30, preset->unk_34); @@ -980,9 +976,6 @@ void func_800DFBF8(void) { osWritebackDCacheAll(); osSetIntMask(intMask); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_heap/func_800DFBF8.s") -#endif void* func_800E04E8(s32 poolIdx, s32 id) { s32 i;