NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_Sound3DCalculator.h
1#ifndef NW4R_SND_SOUND_3D_CALCULATOR_H
2#define NW4R_SND_SOUND_3D_CALCULATOR_H
3
4#include <types.h>
5
6#include "nw4r/snd/snd_Sound3DListener.h"
7#include "nw4r/math/math_triangular.h"
8
9namespace nw4r {
10namespace snd {
11
12class Sound3DManager;
13class Sound3DParam;
14
16public:
17 struct CalcPanParam {
18 f32 speakerAngleStereo; // at 0x00
19 f32 frontSpeakerAngleDpl2; // at 0x04
20 f32 rearSpeakerAngleDpl2; // at 0x08
21 f32 initPan; // at 0x0C
22
23 CalcPanParam()
24 : speakerAngleStereo(NW4R_MATH_PI / 4),
25 frontSpeakerAngleDpl2(NW4R_MATH_PI / 6),
26 rearSpeakerAngleDpl2(2 * NW4R_MATH_PI / 3),
27 initPan(0.0f) {}
28 };
29
30 static void
31 CalcVolumeAndPriority(const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, float *, int *);
32 static void CalcPan(
34 float *pan, float *surroundPan
35 );
36 static void CalcPitch(const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, float *);
37 static void CalcBiquadFilterValue(const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, float *);
38 static void CalcPanDpl2(const nw4r::math::VEC3 &, float, float, float, float, float, float, float *, float *);
39 static void CalcPanStereo(const nw4r::math::VEC3 &, float, float, float, float, float *, float *);
40 static void CalcAngleAndDistance(const nw4r::math::VEC3 &, float, float, float *, float *);
41};
42
43} // namespace snd
44} // namespace nw4r
45
46#endif