]> git.sesse.net Git - kdenlive/blobdiff - src/lib/audio/audioCorrelation.h
FFT correlation is now used for larger audio samples when aligning.
[kdenlive] / src / lib / audio / audioCorrelation.h
index d5b04024e118d0291b60f3446715dd1ac79b1752..3c8527b2b075e4e9c8b79f348b584d9895507e01 100644 (file)
@@ -15,7 +15,6 @@
 #include "audioEnvelope.h"
 #include <QList>
 
-class AudioCorrelationInfo;
 
 /**
   This class does the correlation between two tracks
@@ -35,12 +34,19 @@ public:
       This object will take ownership of the passed envelope.
       \return The child's index
       */
-    int addChild(AudioEnvelope *envelope);
+    int addChild(AudioEnvelope *envelope, bool useFFT = false);
 
     const AudioCorrelationInfo *info(int childIndex) const;
     int getShift(int childIndex) const;
 
-
+    /**
+      Correlates the two vectors envMain and envSub.
+      \c correlation must be a pre-allocated vector of size sizeMain+sizeSub+1.
+      */
+    static void correlate(const int64_t *envMain, int sizeMain,
+                          const int64_t *envSub, int sizeSub,
+                          int64_t *correlation,
+                          int64_t *out_max = NULL);
 private:
     AudioEnvelope *m_mainTrackEnvelope;