-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathReverb.h
53 lines (41 loc) · 1.09 KB
/
Reverb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
class ReverbBounce;
class ReverbParam;
class Reverb;
#include <cstdio>
#include <vector>
class ReverbBounce
{
public:
size_t FramesBack;
float AmpScale;
ReverbBounce( void );
ReverbBounce( size_t f, float a );
~ReverbBounce();
};
class ReverbParam
{
public:
float SpeakerSide, SpeakerFront, SideWall, FrontWall, BackWall, Ceiling, Floor;
float HeadWidth, BehindScale;
float BounceEnergy;
float TotalScale;
std::vector<ReverbBounce> SameSide, OppoSide;
ReverbParam( void );
~ReverbParam();
float SpeakerDist( void ) const;
float BouncedDist( int x_bounces, int y_bounces, int z_bounces, bool up, bool opposite ) const;
float AmpScale( int x_bounces, int y_bounces, int z_bounces, bool up, bool opposite ) const;
void AddBounce( int x_bounces, int y_bounces, int z_bounces, bool up, bool opposite, float speaker, int rate );
void Setup( unsigned int rate );
};
class Reverb
{
private:
float *History;
unsigned int Rate;
public:
Reverb( void );
~Reverb();
void Process( float *buffer, unsigned int channels, unsigned int rate, size_t frames, ReverbParam *param );
};