浏览代码

cmVectOpsTemplateCode.h : Fixed bug in SynthImpulse.

master
kevin 9 年前
父节点
当前提交
a6ed3110e4
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      vop/cmVectOpsTemplateCode.h

+ 4
- 1
vop/cmVectOpsTemplateCode.h 查看文件

@@ -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
 

正在加载...
取消
保存