1 /***************************************************************************
2 * Copyright (C) 2012 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 ***************************************************************************/
11 #ifndef AUDIOCORRELATIONINFO_H
12 #define AUDIOCORRELATIONINFO_H
16 #include <sys/types.h>
19 This class holds the correlation of two audio samples.
20 It is mainly a container for data, the correlation itself is calculated
21 in the class AudioCorrelation.
23 class AudioCorrelationInfo
26 AudioCorrelationInfo(int mainSize, int subSize);
27 ~AudioCorrelationInfo();
30 int64_t* correlationVector();
31 int64_t const* correlationVector() const;
34 Returns the maximum value in the correlation vector.
35 If it has not been set before with setMax(), it will be calculated.
38 void setMax(int64_t max); ///< Can be set to avoid calculating the max again in this function
41 Returns the index of the largest value in the correlation vector
45 QImage toImage(int height = 400) const;
51 int64_t *m_correlationVector;
56 #endif // AUDIOCORRELATIONINFO_H