aboutsummaryrefslogtreecommitdiff
path: root/common/fft.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/fft.cpp')
-rw-r--r--common/fft.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/common/fft.cpp b/common/fft.cpp
index a9c58ead9b..27a04abb6a 100644
--- a/common/fft.cpp
+++ b/common/fft.cpp
@@ -8,12 +8,12 @@
* 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.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -56,11 +56,19 @@ FFT::FFT(int bits, int inverse) : _bits(bits), _inverse(inverse) {
}
FFT::~FFT() {
+ for (int i = 0; i < ARRAYSIZE(_cosTables); i++) {
+ delete _cosTables[i];
+ }
+
delete[] _revTab;
delete[] _expTab;
delete[] _tmpBuf;
}
+const uint16 *FFT::getRevTab() const {
+ return _revTab;
+}
+
void FFT::permute(Complex *z) {
int np = 1 << _bits;