diff options
Diffstat (limited to 'sndobj/HammingTable.cpp')
-rw-r--r-- | sndobj/HammingTable.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sndobj/HammingTable.cpp b/sndobj/HammingTable.cpp index b10301e..20c37b5 100644 --- a/sndobj/HammingTable.cpp +++ b/sndobj/HammingTable.cpp @@ -32,16 +32,16 @@ HammingTable :: HammingTable(){ m_L = 1024; m_alpha = .54f; - m_table = new float[m_L+1]; + m_table = new double[m_L+1]; MakeTable(); } -HammingTable :: HammingTable(long L, float alpha){ +HammingTable :: HammingTable(long L, double alpha){ m_L = L; m_alpha = alpha; - m_table = new float [m_L+1]; + m_table = new double [m_L+1]; MakeTable(); } @@ -56,18 +56,18 @@ HammingTable :: ~HammingTable(){ ///////////// OPERATIONS //////////////////////////////////// void -HammingTable :: SetParam(long L, float alpha){ +HammingTable :: SetParam(long L, double alpha){ m_alpha = alpha; m_L = L; delete[] m_table; - m_table = new float[m_L+1]; + m_table = new double[m_L+1]; } short HammingTable :: MakeTable(){ for(long n = 0; n < m_L; n++) - m_table[n]= (float)(m_alpha - (1-m_alpha)* + m_table[n]= (double)(m_alpha - (1-m_alpha)* cos(n*TWOPI/(m_L-1.))); m_table[m_L] = m_table[m_L-1]; return 1; |