diff options
Diffstat (limited to 'servers/audio/effects/reverb.h')
-rw-r--r-- | servers/audio/effects/reverb.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/servers/audio/effects/reverb.h b/servers/audio/effects/reverb.h index f0a0466f8a..33f11e59fe 100644 --- a/servers/audio/effects/reverb.h +++ b/servers/audio/effects/reverb.h @@ -32,27 +32,26 @@ #ifndef REVERB_H #define REVERB_H -#include "typedefs.h" -#include "os/memory.h" #include "audio_frame.h" +#include "os/memory.h" +#include "typedefs.h" class Reverb { public: enum { - INPUT_BUFFER_MAX_SIZE=1024, + INPUT_BUFFER_MAX_SIZE = 1024, }; + private: enum { - MAX_COMBS=8, - MAX_ALLPASS=4, - MAX_ECHO_MS=500 + MAX_COMBS = 8, + MAX_ALLPASS = 4, + MAX_ECHO_MS = 500 }; - - static const float comb_tunings[MAX_COMBS]; static const float allpass_tunings[MAX_ALLPASS]; @@ -66,7 +65,13 @@ private: int pos; int extra_spread_frames; - Comb() { size=0; buffer=0; feedback=0; damp_h=0; pos=0; } + Comb() { + size = 0; + buffer = 0; + feedback = 0; + damp_h = 0; + pos = 0; + } }; struct AllPass { @@ -75,7 +80,11 @@ private: float *buffer; int pos; int extra_spread_frames; - AllPass() { size=0; buffer=0; pos=0; } + AllPass() { + size = 0; + buffer = 0; + pos = 0; + } }; Comb comb[MAX_COMBS]; @@ -85,8 +94,7 @@ private: int echo_buffer_size; int echo_buffer_pos; - float hpf_h1,hpf_h2; - + float hpf_h1, hpf_h2; struct Parameters { @@ -105,8 +113,8 @@ private: void configure_buffers(); void update_parameters(); void clear_buffers(); -public: +public: void set_room_size(float p_size); void set_damp(float p_damp); void set_wet(float p_wet); @@ -118,14 +126,11 @@ public: void set_extra_spread(float p_spread); void set_extra_spread_base(float p_sec); - void process(float *p_src,float *p_dst,int p_frames); + void process(float *p_src, float *p_dst, int p_frames); Reverb(); ~Reverb(); - }; - - #endif |