1 /***************************************************************************
2 * Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com) *
3 * This file is part of kdenlive. See www.kdenlive.org. *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
21 enum WindowType { Window_Rect, Window_Triangle, Window_Hamming };
23 /** Creates a vector containing the factors for the selected window functions.
24 The last element in the vector (at position size+1) contains the area of
25 this window function compared to the rectangular window (e.g. for a triangular
26 window the factor will be 0.5).
27 Knowing this factor is important for the Fourier Transformation as the
28 values in the frequency domain will be scaled by this factor and need to be
29 re-scaled for proper dB display.
30 The additional parameter describes:
31 * Nothing for the Rectangular window
32 * The left and right start values for the Triangular window (i.e. ranges between param and 1;
34 * Nothing for the Hamming window
36 static const QVector<float> window(const WindowType windowType, const int size, const float param);
38 static const QString windowSignature(const WindowType windowType, const int size, const float param);