Correct looping through samples

This commit is contained in:
Geoffrey Merck 2020-04-04 17:51:08 +02:00
parent 5cbb115ddb
commit 11bc4cb7c7
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ CFIRFilter::~CFIRFilter()
inline void CFIRFilter::ProcessSampleBlock(uint8* voice, int length)
{
for(int i = 0; i < length; i++)
for(int i = 0; i < length; i += 2)
{
float input = (float)(short)MAKEWORD(voice[i+1], voice[i]);
float output = 0.0f;

View File

@ -40,7 +40,7 @@ CFixedGain::CFixedGain(float gaindB)
inline void CFixedGain::ProcessSampleBlock(uint8* voice, int length)
{
for(int i = 0; i < length; i++)
for(int i = 0; i < length; i += 2)
{
float input = (float)(short)MAKEWORD(voice[i+1], voice[i]);
//apply gain