NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_global.h
1#ifndef NW4R_SND_GLOBAL_H
2#define NW4R_SND_GLOBAL_H
3
4/*******************************************************************************
5 * headers
6 */
7
8#include <types.h>
9
10/*******************************************************************************
11 * types
12 */
13
14#if defined(__cplusplus)
15
16// Macro for for loops using NW4R iterators
17# define NW4R_RANGE_FOR(it_, list_) \
18 for (decltype((list_).GetBeginIter()) (it_) = (list_).GetBeginIter(); (it_) != (list_).GetEndIter(); ++(it_))
19
20/* This macro specifically is for the for loops which declare an
21 * Iterator currIt = it++; in the body, so that it does not get incremented
22 * twice.
23 */
24# define NW4R_RANGE_FOR_NO_AUTO_INC(it_, list_) \
25 for (decltype((list_).GetBeginIter()) (it_) = (list_).GetBeginIter(); (it_) != (list_).GetEndIter();)
26
27#endif // defined(__cplusplus)
28
29namespace nw4r { namespace snd
30{
31 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x26bd0
32 enum AuxBus
33 {
34 AUX_A,
35 AUX_B,
36 AUX_C,
37 };
38
39 // TODO: would this fit as AX_MAX_AUX in AX?
40 static int const AUX_BUS_NUM = 3;
41
42 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x20f19
43 enum OutputMode
44 {
45 OUTPUT_MODE_STEREO,
46 OUTPUT_MODE_SURROUND,
47 OUTPUT_MODE_DPL2,
48 OUTPUT_MODE_MONO,
49 };
50
51 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x25ec5
52 enum PanMode
53 {
54 PAN_MODE_DUAL,
55 PAN_MODE_BALANCE,
56 };
57
58 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x25f0e
59 enum PanCurve
60 {
61 PAN_CURVE_SQRT,
62 PAN_CURVE_SQRT_0DB,
63 PAN_CURVE_SQRT_0DB_CLAMP,
64
65 PAN_CURVE_SINCOS,
66 PAN_CURVE_SINCOS_0DB,
67 PAN_CURVE_SINCOS_0DB_CLAMP,
68
69 PAN_CURVE_LINEAR,
70 PAN_CURVE_LINEAR_0DB,
71 PAN_CURVE_LINEAR_0DB_CLAMP,
72 };
73
74 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x20e89
75 enum SampleFormat
76 {
77 SAMPLE_FORMAT_PCM_S32,
78 SAMPLE_FORMAT_PCM_S16,
79 SAMPLE_FORMAT_PCM_S8,
80 SAMPLE_FORMAT_DSP_ADPCM,
81 };
82
83 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x273ea
84 struct VoiceOutParam
85 {
86 // methods
87 public:
88 // cdtors
89 VoiceOutParam() :
90 volume (1.0f),
91 pitch (1.0f),
92 pan (0.0f),
93 surroundPan (0.0f),
94 fxSend (0.0f),
95 lpf (0.0f)
96 {
97 }
98
99 // members
100 public:
101 f32 volume; // size 0x04, offset 0x00
102 f32 pitch; // size 0x04, offset 0x04
103 f32 pan; // size 0x04, offset 0x08
104 f32 surroundPan; // size 0x04, offset 0x0c
105 f32 fxSend; // size 0x04, offset 0x10
106 f32 lpf; // size 0x04, offset 0x14
107 }; // size 0x18
108}} // namespace nw4r::snd
109
110#endif // NW4R_SND_GLOBAL_H