Skip to content

Commit

Permalink
use the filter class in mod_class
Browse files Browse the repository at this point in the history
  • Loading branch information
ThKattanek committed Nov 4, 2018
1 parent bfb6a1d commit 3f52929
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/mod_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// //
// #file: mod_class.cpp //
// //
// last change: 09-28-2018 //
// last change: 11-04-2018 //
// https://github.com/ThKattanek/mod-player //
// //
//////////////////////////////////////////////////
Expand Down Expand Up @@ -958,15 +958,13 @@ void MODClass::CalcNextSamples(float *samples)
float s0 = (float)samples[0];
float s1 = (float)samples[1];

lp_filterL->update(s0);
s0 = lp_filterL->update(s0);
if(s0>1.0) s0=1.0;
if(s0<-1.0) s0=-1.0;
s0 = lp_filterL->getOutput();

lp_filterR->update(s1);
s1 = lp_filterR->update(s1);
if(s1>1.0) s1=1;
if(s1<-1.0) s1=-1.0;
s1 = lp_filterR->getOutput();

samples[0] = s0;
samples[1] = s1;
Expand Down

0 comments on commit 3f52929

Please sign in to comment.