Decompile n_alSavePull
This commit is contained in:
parent
d3ef0a34ad
commit
dcaeff8daf
|
@ -56,11 +56,11 @@ typedef struct {
|
|||
struct ALParam_s *paramList;
|
||||
struct N_ALMainBus_s *mainBus;
|
||||
struct N_ALAuxBus_s *auxBus;
|
||||
struct N_ALFilter_s *outputFilter;
|
||||
s32 numPVoices;
|
||||
s32 maxAuxBusses;
|
||||
s32 outputRate;
|
||||
s32 maxOutSamples;
|
||||
s32 sv_dramout;
|
||||
} N_ALSynth;
|
||||
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
build/ROMID/lib/naudio/n_syndelete.o (section); \
|
||||
build/ROMID/lib/lib_39fe0.o (section); \
|
||||
build/ROMID/lib/lib_3a100.o (section); \
|
||||
build/ROMID/lib/lib_3c430.o (section); \
|
||||
build/ROMID/lib/naudio/n_save.o (section); \
|
||||
build/ROMID/lib/naudio/n_event.o (section); \
|
||||
build/ROMID/lib/lib_3c890.o (section); \
|
||||
build/ROMID/lib/lib_3ccf0.o (section); \
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
build/ROMID/lib/naudio/n_syndelete.o (section); \
|
||||
build/ROMID/lib/lib_39fe0.o (section); \
|
||||
build/ROMID/lib/lib_3a100.o (section); \
|
||||
build/ROMID/lib/lib_3c430.o (section); \
|
||||
build/ROMID/lib/naudio/n_save.o (section); \
|
||||
build/ROMID/lib/naudio/n_event.o (section); \
|
||||
build/ROMID/lib/lib_3c890.o (section); \
|
||||
build/ROMID/lib/lib_3ccf0.o (section); \
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
build/ROMID/lib/naudio/n_syndelete.o (section); \
|
||||
build/ROMID/lib/lib_39fe0.o (section); \
|
||||
build/ROMID/lib/lib_3a100.o (section); \
|
||||
build/ROMID/lib/lib_3c430.o (section); \
|
||||
build/ROMID/lib/naudio/n_save.o (section); \
|
||||
build/ROMID/lib/naudio/n_event.o (section); \
|
||||
build/ROMID/lib/lib_3c890.o (section); \
|
||||
build/ROMID/lib/lib_3ccf0.o (section); \
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#ifndef _IN_LIB_LIB_3C430_H
|
||||
#define _IN_LIB_LIB_3C430_H
|
||||
#include <ultra64.h>
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
Acmd *n_alSavePull(s32 arg0, void *arg1);
|
||||
|
||||
#endif
|
|
@ -4,6 +4,6 @@
|
|||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
u32 func00044bc0(void);
|
||||
u32 n_alMainBusPull(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "bss.h"
|
||||
#include "lib/lib_44bc0.h"
|
||||
#include "data.h"
|
||||
#include "types.h"
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel n_alSavePull
|
||||
/* 3c430: 27bdffd8 */ addiu $sp,$sp,-40
|
||||
/* 3c434: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* 3c438: afa40028 */ sw $a0,0x28($sp)
|
||||
/* 3c43c: afa5002c */ sw $a1,0x2c($sp)
|
||||
/* 3c440: 8fae002c */ lw $t6,0x2c($sp)
|
||||
/* 3c444: afae0024 */ sw $t6,0x24($sp)
|
||||
/* 3c448: 8fa40028 */ lw $a0,0x28($sp)
|
||||
/* 3c44c: 0c0112f0 */ jal func00044bc0
|
||||
/* 3c450: 8fa50024 */ lw $a1,0x24($sp)
|
||||
/* 3c454: afa20024 */ sw $v0,0x24($sp)
|
||||
/* 3c458: 8faf0024 */ lw $t7,0x24($sp)
|
||||
/* 3c45c: 25f80008 */ addiu $t8,$t7,0x8
|
||||
/* 3c460: afb80024 */ sw $t8,0x24($sp)
|
||||
/* 3c464: afaf0020 */ sw $t7,0x20($sp)
|
||||
/* 3c468: 8fa80020 */ lw $t0,0x20($sp)
|
||||
/* 3c46c: 3c190d00 */ lui $t9,0xd00
|
||||
/* 3c470: ad190000 */ sw $t9,0x0($t0)
|
||||
/* 3c474: 8fa90024 */ lw $t1,0x24($sp)
|
||||
/* 3c478: 252a0008 */ addiu $t2,$t1,0x8
|
||||
/* 3c47c: afaa0024 */ sw $t2,0x24($sp)
|
||||
/* 3c480: afa9001c */ sw $t1,0x1c($sp)
|
||||
/* 3c484: 8fac001c */ lw $t4,0x1c($sp)
|
||||
/* 3c488: 3c0b062e */ lui $t3,0x62e
|
||||
/* 3c48c: ad8b0000 */ sw $t3,0x0($t4)
|
||||
/* 3c490: 3c0d8006 */ lui $t5,%hi(n_syn)
|
||||
/* 3c494: 8dadf114 */ lw $t5,%lo(n_syn)($t5)
|
||||
/* 3c498: 8faf001c */ lw $t7,0x1c($sp)
|
||||
/* 3c49c: 8dae0048 */ lw $t6,0x48($t5)
|
||||
/* 3c4a0: adee0004 */ sw $t6,0x4($t7)
|
||||
/* 3c4a4: 10000003 */ b .L0003c4b4
|
||||
/* 3c4a8: 8fa20024 */ lw $v0,0x24($sp)
|
||||
/* 3c4ac: 10000001 */ b .L0003c4b4
|
||||
/* 3c4b0: 00000000 */ nop
|
||||
.L0003c4b4:
|
||||
/* 3c4b4: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* 3c4b8: 27bd0028 */ addiu $sp,$sp,0x28
|
||||
/* 3c4bc: 03e00008 */ jr $ra
|
||||
/* 3c4c0: 00000000 */ nop
|
||||
);
|
|
@ -7,7 +7,7 @@
|
|||
#include "types.h"
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func00044bc0
|
||||
glabel n_alMainBusPull
|
||||
/* 44bc0: 27bdffb8 */ addiu $sp,$sp,-72
|
||||
/* 44bc4: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* 44bc8: afa40048 */ sw $a0,0x48($sp)
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#include "n_synthInternals.h"
|
||||
#include <os.h>
|
||||
|
||||
Acmd *n_alSavePull(s32 sampleOffset, Acmd *p)
|
||||
{
|
||||
Acmd *ptr = p;
|
||||
|
||||
ptr = n_alMainBusPull(sampleOffset, ptr);
|
||||
|
||||
n_aInterleave(ptr++);
|
||||
n_aSaveBuffer(ptr++, FIXED_SAMPLE << 2, 0, n_syn->sv_dramout);
|
||||
|
||||
return ptr;
|
||||
}
|
|
@ -454,10 +454,10 @@ Acmd *n_alAudioFrame(Acmd *cmdList, s32 *cmdLen, s16 *outBuf, s32 outLen)
|
|||
* Now build the command list in small chunks
|
||||
*/
|
||||
while (outLen > 0) {
|
||||
nOut = MIN(n_syn->outputRate, outLen);
|
||||
nOut = MIN(n_syn->maxOutSamples, outLen);
|
||||
|
||||
cmdPtr = cmdlEnd;
|
||||
n_syn->maxOutSamples = (s32)lOutBuf;
|
||||
n_syn->sv_dramout = (s32)lOutBuf;
|
||||
|
||||
cmdlEnd = n_alSavePull(n_syn->curSamples, cmdPtr);
|
||||
|
||||
|
@ -513,8 +513,7 @@ void _n_freePVoice(N_PVoice *pvoice)
|
|||
|
||||
s32 _n_timeToSamplesNoRound(s32 micros)
|
||||
{
|
||||
// Should be outputRate but struct is not sized correctly
|
||||
f32 tmp = ((f32)micros) * n_syn->maxAuxBusses / 1000000.0f + 0.5f;
|
||||
f32 tmp = ((f32)micros) * n_syn->outputRate / 1000000.0f + 0.5f;
|
||||
|
||||
return (s32)tmp;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue