NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_adpcm.h
1#ifndef NW4R_SND_ADPCM_H
2#define NW4R_SND_ADPCM_H
3
4/*******************************************************************************
5 * headers
6 */
7
8#include <types.h>
9
10#include <revolution/AX/AXVPB.h> // AXPBADPCM
11
12/*******************************************************************************
13 * types
14 */
15
16namespace nw4r { namespace snd { // namespace detail
17// {
18 // Why are these just the AX types
19
20 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x291b3
21 struct AdpcmParam // AXPBADPCM
22 {
23 u16 coef[8 * 2]; // size 0x20, offset 0x00
24 u16 gain; // size 0x02, offset 0x20
25 u16 pred_scale; // size 0x02, offset 0x22
26 u16 yn1; // size 0x02, offset 0x24
27 u16 yn2; // size 0x02, offset 0x26
28 }; // size 0x28
29namespace detail
30{
31 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x29290
32 struct AdpcmLoopParam // AXPBADPCMLOOP
33 {
34 u16 loop_pred_scale; // size 0x02, offset 0x00
35 u16 loop_yn1; // size 0x02, offset 0x02
36 u16 loop_yn2; // size 0x02, offset 0x04
37 }; // size 0x06
38}
39}} // namespace nw4r::snd // ::detail
40
41/*******************************************************************************
42 * classes and functions
43 */
44
45namespace nw4r { namespace snd { namespace detail
46{
47 s16 DecodeDspAdpcm(AXPBADPCM *adpcm, byte_t bits);
48}}} // namespace nw4r::snd::detail
49
50#endif // NW4R_SND_ADPCM_H