]> git.sesse.net Git - kdenlive/blobdiff - testingArea/audioCorrelationInfo.h
Audio alignment works.
[kdenlive] / testingArea / audioCorrelationInfo.h
diff --git a/testingArea/audioCorrelationInfo.h b/testingArea/audioCorrelationInfo.h
new file mode 100644 (file)
index 0000000..ee2ea82
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef AUDIOCORRELATIONINFO_H
+#define AUDIOCORRELATIONINFO_H
+
+#include <QImage>
+
+class AudioCorrelationInfo
+{
+public:
+    AudioCorrelationInfo(int mainSize, int subSize);
+    ~AudioCorrelationInfo();
+
+    int size() const;
+    int64_t* correlationVector();
+    int64_t const* correlationVector() const;
+
+    int64_t max() const;
+    void setMax(int64_t max); ///< Can be set to avoid calculating the max again in this function
+
+    int maxIndex() const;
+
+    QImage toImage(int height = 400) const;
+
+private:
+    int m_mainSize;
+    int m_subSize;
+
+    int64_t *m_correlationVector;
+    int64_t m_max;
+
+};
+
+#endif // AUDIOCORRELATIONINFO_H