comparison dsp/phasevocoder/PhaseVocoder.cpp @ 483:fdaa63607c15

Untabify, indent, tidy
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 31 May 2019 11:54:32 +0100
parents 58ba20857a5e
children
comparison
equal deleted inserted replaced
482:cbe668c7d724 483:fdaa63607c15
103 m_unwrapped[i] = -omega; 103 m_unwrapped[i] = -omega;
104 } 104 }
105 } 105 }
106 106
107 void PhaseVocoder::getMagnitudes(double *mag) 107 void PhaseVocoder::getMagnitudes(double *mag)
108 { 108 {
109 for (int i = 0; i < m_n/2 + 1; i++) { 109 for (int i = 0; i < m_n/2 + 1; i++) {
110 mag[i] = sqrt(m_real[i] * m_real[i] + m_imag[i] * m_imag[i]); 110 mag[i] = sqrt(m_real[i] * m_real[i] + m_imag[i] * m_imag[i]);
111 } 111 }
112 } 112 }
113 113
114 void PhaseVocoder::getPhases(double *theta) 114 void PhaseVocoder::getPhases(double *theta)
115 { 115 {
116 for (int i = 0; i < m_n/2 + 1; i++) { 116 for (int i = 0; i < m_n/2 + 1; i++) {
117 theta[i] = atan2(m_imag[i], m_real[i]); 117 theta[i] = atan2(m_imag[i], m_real[i]);
118 } 118 }
119 } 119 }
120 120
121 void PhaseVocoder::unwrapPhases(double *theta, double *unwrapped) 121 void PhaseVocoder::unwrapPhases(double *theta, double *unwrapped)
122 { 122 {
123 for (int i = 0; i < m_n/2 + 1; ++i) { 123 for (int i = 0; i < m_n/2 + 1; ++i) {