NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
AXVPB.h
1#ifndef RVL_SDK_AX_VPB_H
2#define RVL_SDK_AX_VPB_H
3#include <revolution/AX/AXPB.h>
4#include <types.h>
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#define AX_SAMPLE_RATE 32000
10#define AX_VOICE_MAX 96
11
12typedef enum {
13 AX_PBSYNC_SELECT = (1 << 0),
14 AX_PBSYNC_MIXER_CTRL = (1 << 1),
15 AX_PBSYNC_STATE = (1 << 2),
16 AX_PBSYNC_TYPE = (1 << 3),
17 AX_PBSYNC_MIX = (1 << 4),
18 AX_PBSYNC_ITD = (1 << 5),
19 AX_PBSYNC_ITD_SHIFT = (1 << 6),
20 AX_PBSYNC_DPOP = (1 << 7),
21 AX_PBSYNC_VE = (1 << 8),
22 AX_PBSYNC_VE_DELTA = (1 << 9),
23 AX_PBSYNC_ADDR = (1 << 10),
24 AX_PBSYNC_LOOP_FLAG = (1 << 11),
25 AX_PBSYNC_LOOP_ADDR = (1 << 12),
26 AX_PBSYNC_END_ADDR = (1 << 13),
27 AX_PBSYNC_CURR_ADDR = (1 << 14),
28 AX_PBSYNC_ADPCM = (1 << 15),
29 AX_PBSYNC_SRC = (1 << 16),
30 AX_PBSYNC_SRC_RATIO = (1 << 17),
31 AX_PBSYNC_ADPCM_LOOP = (1 << 18),
32 AX_PBSYNC_LPF = (1 << 19),
33 AX_PBSYNC_LPF_COEFS = (1 << 20),
34 AX_PBSYNC_BIQUAD = (1 << 21),
35 AX_PBSYNC_BIQUAD_COEFS = (1 << 22),
36 AX_PBSYNC_REMOTE = (1 << 23),
37 AX_PBSYNC_RMT_MIXER_CTRL = (1 << 24),
38 AX_PBSYNC_RMTMIX = (1 << 25),
39 AX_PBSYNC_RMTDPOP = (1 << 26),
40 AX_PBSYNC_RMTSRC = (1 << 27),
41 AX_PBSYNC_RMTIIR = (1 << 28),
42 AX_PBSYNC_RMTIIR_LPF_COEFS = (1 << 29),
43 AX_PBSYNC_RMTIIR_BIQUAD_COEFS = (1 << 30),
44 AX_PBSYNC_ALL = (1 << 31),
45};
46
47typedef void (*AXVoiceCallback)(void* vpb);
48
49typedef struct _AXVPB {
50 void* next; // at 0x0
51 void* prev; // at 0x4
52 void* next1; // at 0x8
53 u32 priority; // at 0xC
54 AXVoiceCallback callback; // at 0x10
55 u32 userContext; // at 0x14
56 u32 index; // at 0x18
57 u32 sync; // at 0x1C
58 u32 depop; // at 0x20
59 void* itdBuffer; // at 0x24
60 AXPB pb; // at 0x28
61} AXVPB;
62
63s32 __AXGetNumVoices(void);
64void __AXServiceVPB(AXVPB* vpb);
65void __AXDumpVPB(AXVPB* vpb);
66void __AXSyncPBs(u32 baseCycles);
67AXPB* __AXGetPBs(void);
68void __AXSetPBDefault(AXVPB* vpb);
69void __AXVPBInit(void);
70void AXSetVoiceState(AXVPB* vpb, u16 state);
71void AXSetVoiceAddr(AXVPB* vpb, AXPBADDR* addr);
72void AXGetLpfCoefs(u16 freq, u16* a, u16* b);
73void AXSetMaxDspCycles(u32 num);
74s32 AXGetMaxVoices(void);
75
76#ifdef __cplusplus
77}
78#endif
79#endif
Definition AXVPB.h:49