diff sinsyn.cpp @ 11:977f541d6683

GPL and cosmetic changes
author Wen X <xue.wen@elec.qmul.ac.uk>
date Wed, 10 Aug 2011 12:33:35 +0100
parents 9b1c0825cc77
children
line wrap: on
line diff
--- a/sinsyn.cpp	Thu Jul 28 10:36:57 2011 +0100
+++ b/sinsyn.cpp	Wed Aug 10 12:33:35 2011 +0100
@@ -1,3 +1,15 @@
+/*
+    Harmonic sinusoidal modelling and tools
+
+    C++ code package for harmonic sinusoidal modelling and relevant signal processing.
+    Centre for Digital Music, Queen Mary, University of London.
+    This file copyright 2011 Wen Xue.
+
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.
+*/
 //---------------------------------------------------------------------------
 
 #include "align8.h"
@@ -788,7 +800,7 @@
     ALIGN8(Sinusoid(&xrec[(int)xs[fr]-dst], 0, xs[fr+1]-xs[fr], a3[fr], a2[fr], a1[fr], a0[fr], f3[fr], f2[fr], f1[fr], f0[fr], ph, add);)
     if (terminatetag && *terminatetag) {delete[] f3; return 0;}
   }
-  phs[Fr-1]=ph;
+  phs[Fr-1]=ph; ph=phs[Fr-2];
   ALIGN8(Sinusoid(&xrec[(int)xs[Fr-2]-dst], xs[Fr-1]-xs[Fr-2], den-xs[Fr-2], a3[Fr-2], a2[Fr-2], a1[Fr-2], a0[Fr-2], f3[Fr-2], f2[Fr-2], f1[Fr-2], f0[Fr-2], ph, add);
          Sinusoid(&xrec[(int)xs[0]-dst], dst-xs[0], 0, a3[0], a2[0], a1[0], a0[0], f3[0], f2[0], f1[0], f0[0], phs[0], add);)
   delete[] f3;