cmVectOpsTemplateCode.h : Fixed bug in SynthImpulse.
This commit is contained in:
parent
77726ebe50
commit
a6ed3110e4
@ -1894,10 +1894,13 @@ unsigned VECT_OP_FUNC(SynthImpulse)( VECT_OP_TYPE* dbp, unsigned dn, unsi
|
|||||||
|
|
||||||
VECT_OP_FUNC(Zero)(dbp,dn);
|
VECT_OP_FUNC(Zero)(dbp,dn);
|
||||||
unsigned i=0;
|
unsigned i=0;
|
||||||
|
unsigned j=dn;
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
double samplesPerCycle = srate / hz;
|
double samplesPerCycle = srate / hz;
|
||||||
unsigned j = round( (srate * i + phase) / hz);
|
|
||||||
|
j = round( (srate * i + phase) / hz);
|
||||||
|
|
||||||
if( j >= dn )
|
if( j >= dn )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user