annotate src/vamp-sdk/FFT.cpp @ 349:dc40fff9f20b

Bump version to 2.5
author Chris Cannam
date Thu, 28 Mar 2013 09:16:11 +0000
parents ab8e761f3ee9
children 5628c5ec4000
rev   line source
Chris@337 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@337 2
Chris@337 3 /*
Chris@337 4 Vamp
Chris@337 5
Chris@337 6 An API for audio analysis and feature extraction plugins.
Chris@337 7
Chris@337 8 Centre for Digital Music, Queen Mary, University of London.
Chris@337 9 Copyright 2006-2012 Chris Cannam and QMUL.
Chris@337 10
Chris@337 11 Permission is hereby granted, free of charge, to any person
Chris@337 12 obtaining a copy of this software and associated documentation
Chris@337 13 files (the "Software"), to deal in the Software without
Chris@337 14 restriction, including without limitation the rights to use, copy,
Chris@337 15 modify, merge, publish, distribute, sublicense, and/or sell copies
Chris@337 16 of the Software, and to permit persons to whom the Software is
Chris@337 17 furnished to do so, subject to the following conditions:
Chris@337 18
Chris@337 19 The above copyright notice and this permission notice shall be
Chris@337 20 included in all copies or substantial portions of the Software.
Chris@337 21
Chris@337 22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Chris@337 23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Chris@337 24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Chris@337 25 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
Chris@337 26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Chris@337 27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
Chris@337 28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chris@337 29
Chris@337 30 Except as contained in this notice, the names of the Centre for
Chris@337 31 Digital Music; Queen Mary, University of London; and Chris Cannam
Chris@337 32 shall not be used in advertising or otherwise to promote the sale,
Chris@337 33 use or other dealings in this Software without prior written
Chris@337 34 authorization.
Chris@337 35 */
Chris@337 36
Chris@337 37 #include <vamp-sdk/FFT.h>
Chris@337 38
Chris@337 39 #include <cmath>
Chris@337 40
Chris@349 41 #if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 5 )
Chris@337 42 #error Unexpected version of Vamp SDK header included
Chris@337 43 #endif
Chris@337 44
chris@340 45 #ifdef _MSC_VER
chris@340 46 #include <stdlib.h>
chris@340 47 #include <malloc.h>
chris@340 48 #endif
chris@340 49
Chris@337 50 _VAMP_SDK_PLUGSPACE_BEGIN(FFT.cpp)
Chris@337 51
Chris@337 52 namespace Vamp {
Chris@337 53
Chris@337 54 #include "FFTimpl.cpp"
Chris@337 55
Chris@337 56 void
Chris@337 57 FFT::forward(unsigned int n,
Chris@337 58 const double *ri, const double *ii,
Chris@337 59 double *ro, double *io)
Chris@337 60 {
Chris@337 61 fft(n, false, ri, ii, ro, io);
Chris@337 62 }
Chris@337 63
Chris@337 64 void
Chris@337 65 FFT::inverse(unsigned int n,
Chris@337 66 const double *ri, const double *ii,
Chris@337 67 double *ro, double *io)
Chris@337 68 {
Chris@337 69 fft(n, true, ri, ii, ro, io);
Chris@337 70 }
Chris@337 71
Chris@337 72 }
Chris@337 73
Chris@337 74 _VAMP_SDK_PLUGSPACE_END(FFT.cpp)
Chris@337 75