[vlc-commits] Spatializer: kill warnings and improve locality

Jean-Baptiste Kempf git at videolan.org
Mon Oct 31 00:42:29 CET 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Oct 28 14:02:51 2011 +0200| [24c463913bbd35f849a6feacdca9f8ccdbe876f6] | committer: Jean-Baptiste Kempf

Spatializer: kill warnings and improve locality

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24c463913bbd35f849a6feacdca9f8ccdbe876f6
---

 modules/audio_filter/spatializer/revmodel.cpp |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/audio_filter/spatializer/revmodel.cpp b/modules/audio_filter/spatializer/revmodel.cpp
index f50c87b..d6dd9cf 100644
--- a/modules/audio_filter/spatializer/revmodel.cpp
+++ b/modules/audio_filter/spatializer/revmodel.cpp
@@ -87,7 +87,7 @@ void revmodel::mute()
  * /param long numsamples  number of samples to be processed
  * /param int skip             number of channels in the audio stream
  *****************************************************************************/
-void revmodel::processreplace(float *inputL, float *outputL, long numsamples, int skip)
+void revmodel::processreplace(float *inputL, float *outputL, long /* numsamples */, int skip)
 {
     float outL,outR,input;
     float inputR;
@@ -121,11 +121,10 @@ void revmodel::processreplace(float *inputL, float *outputL, long numsamples, in
         outputL[1] = (outR*wet1 + outL*wet2 + inputR*dry);
 }
 
-void revmodel::processmix(float *inputL, float *outputL, long numsamples, int skip)
+void revmodel::processmix(float *inputL, float *outputL, long /* numsamples */, int skip)
 {
     float outL,outR,input;
     float inputR;
-    int i;
 
     outL = outR = 0;
         if (skip > 1)
@@ -135,14 +134,14 @@ void revmodel::processmix(float *inputL, float *outputL, long numsamples, int sk
         input = (inputL[0] + inputR) * gain;
 
         // Accumulate comb filters in parallel
-        for(i=0; i<numcombs; i++)
+        for(int i=0; i<numcombs; i++)
         {
             outL += combL[i].process(input);
             outR += combR[i].process(input);
         }
 
         // Feed through allpasses in series
-        for(i=0; i<numallpasses; i++)
+        for(int i=0; i<numallpasses; i++)
         {
             outL = allpassL[i].process(outL);
             outR = allpassR[i].process(outR);
@@ -158,8 +157,6 @@ void revmodel::update()
 {
 // Recalculate internal values after parameter change
 
-    int i;
-
     wet1 = wet*(width/2 + 0.5f);
     wet2 = wet*((1-width)/2);
 
@@ -176,13 +173,13 @@ void revmodel::update()
         gain = fixedgain;
     }
 
-    for(i=0; i<numcombs; i++)
+    for(int i=0; i<numcombs; i++)
     {
         combL[i].setfeedback(roomsize1);
         combR[i].setfeedback(roomsize1);
     }
 
-    for(i=0; i<numcombs; i++)
+    for(int i=0; i<numcombs; i++)
     {
         combL[i].setdamp(damp1);
         combR[i].setdamp(damp1);



More information about the vlc-commits mailing list