cmVectOpsTemplateCode.h : Fixed bug in SynthImpulse.

This commit is contained in:
kevin 2015-08-27 13:10:38 -04:00
parent 77726ebe50
commit a6ed3110e4

View File

@ -1894,10 +1894,13 @@ unsigned VECT_OP_FUNC(SynthImpulse)( VECT_OP_TYPE* dbp, unsigned dn, unsi
VECT_OP_FUNC(Zero)(dbp,dn);
unsigned i=0;
unsigned j=dn;
while(1)
{
double samplesPerCycle = srate / hz;
unsigned j = round( (srate * i + phase) / hz);
j = round( (srate * i + phase) / hz);
if( j >= dn )
break;