]> git.sesse.net Git - vlc/blobdiff - modules/audio_filter/spatializer/comb.hpp
Merge branch '1.0-bugfix'
[vlc] / modules / audio_filter / spatializer / comb.hpp
index 2da83db60287d4f6961221e5fcafa0ea74b93c52..4017af3cf39347690dbbf20ef356a5cd7f950af5 100644 (file)
@@ -9,6 +9,10 @@
 
 #include "denormals.h"
 
+/**
+* Combination filter
+*Takes multiple audio channels and mix them for one ear
+*/
 class comb
 {
 public:
@@ -35,15 +39,16 @@ private:
 
 inline float comb::process(float input)
 {
+/* FIXME
+* comb::process is not really ear-friendly the tunning values must
+* be changed*/
     float output;
 
-    output = buffer[bufidx];
-    undenormalise(output);
+    output = undenormalise( buffer[bufidx] );
 
-    filterstore = (output*damp2) + (filterstore*damp1);
-    undenormalise(filterstore);
+    filterstore = undenormalise(output*damp2);
 
-    buffer[bufidx] = input + (filterstore*feedback);
+    buffer[bufidx] = input + filterstore*feedback;
 
     if(++bufidx>=bufsize) bufidx = 0;