Equalizer: Fixed sample wrapping when outside of int16_t range
This commit is contained in:
parent
297e57ae9a
commit
bb835fccc9
2 changed files with 3 additions and 2 deletions
|
@ -12,8 +12,8 @@ void Equalizer::ApplyEqualizer(uint32_t sampleCount, int16_t *samples)
|
|||
_equalizerLeft->sbs_process(&inL, &outL);
|
||||
_equalizerRight->sbs_process(&inR, &outR);
|
||||
|
||||
samples[i * 2] = (int16_t)outL;
|
||||
samples[i * 2 + 1] = (int16_t)outR;
|
||||
samples[i * 2] = (int16_t)std::max(std::min(outL, 32767.0), -32768.0);
|
||||
samples[i * 2 + 1] = (int16_t)std::max(std::min(outR, 32767.0), -32768.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <vector>
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
|
||||
#include "UTF8Util.h"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue