Ver código fonte

cmVectOpsTemplateCode.h : Fixed bug in SynthImpulse.

master
kevin 9 anos atrás
pai
commit
a6ed3110e4
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      vop/cmVectOpsTemplateCode.h

+ 4
- 1
vop/cmVectOpsTemplateCode.h Ver arquivo

@@ -1894,10 +1894,13 @@ unsigned      VECT_OP_FUNC(SynthImpulse)(   VECT_OP_TYPE* dbp, unsigned dn, unsi
1894 1894
   
1895 1895
   VECT_OP_FUNC(Zero)(dbp,dn);
1896 1896
   unsigned i=0;
1897
+  unsigned j=dn;
1897 1898
   while(1)
1898 1899
   {
1899 1900
     double samplesPerCycle = srate / hz;
1900
-    unsigned j = round( (srate * i + phase) / hz);
1901
+    
1902
+    j = round( (srate * i + phase) / hz);
1903
+    
1901 1904
     if( j >= dn )
1902 1905
       break;
1903 1906
 

Carregando…
Cancelar
Salvar