]> git.sesse.net Git - vlc/blob - modules/audio_filter/spatializer/allpass.cpp
Use var_Inherit* instead of var_CreateGet*.
[vlc] / modules / audio_filter / spatializer / allpass.cpp
1 // Allpass filter implementation
2 //
3 // Written by Jezar at Dreampoint, June 2000
4 // http://www.dreampoint.co.uk
5 // This code is public domain
6
7 #include "allpass.hpp"
8
9 allpass::allpass()
10 {
11     bufidx = 0;
12 }
13
14 void allpass::setbuffer(float *buf, int size)
15 {
16     buffer = buf;
17     bufsize = size;
18 }
19
20 void allpass::mute()
21 {
22     for (int i=0; i<bufsize; i++)
23         buffer[i]=0;
24 }
25
26 void allpass::setfeedback(float val)
27 {
28     feedback = val;
29 }
30
31 float allpass::getfeedback()
32 {
33     return feedback;
34 }
35
36 //ends