mirror of https://github.com/ShaYmez/xlxd.git
Correct looping through samples
This commit is contained in:
parent
5cbb115ddb
commit
11bc4cb7c7
|
@ -45,7 +45,7 @@ CFIRFilter::~CFIRFilter()
|
||||||
|
|
||||||
inline void CFIRFilter::ProcessSampleBlock(uint8* voice, int length)
|
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 input = (float)(short)MAKEWORD(voice[i+1], voice[i]);
|
||||||
float output = 0.0f;
|
float output = 0.0f;
|
||||||
|
|
|
@ -40,7 +40,7 @@ CFixedGain::CFixedGain(float gaindB)
|
||||||
|
|
||||||
inline void CFixedGain::ProcessSampleBlock(uint8* voice, int length)
|
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]);
|
float input = (float)(short)MAKEWORD(voice[i+1], voice[i]);
|
||||||
//apply gain
|
//apply gain
|
||||||
|
|
Loading…
Reference in New Issue