Unjumble the PT5 wav ordering in regions/tracks
[ardour.git] / libs / ptformat / ptfformat.h
index be7076dbfda7d274209c773f9fb945e849a2bf93..1d3dac2ba35b8ed66425b21864c13473fed8c629 100644 (file)
 #define PTFFORMAT_H
 
 #include <string>
+#include <cstring>
 #include <algorithm>
 #include <vector>
 #include <stdint.h>
-
 #include "ptformat/visibility.h"
 
 class LIBPTFORMAT_API PTFFormat {
@@ -39,6 +39,11 @@ public:
                int64_t     posabsolute;
                int64_t     length;
 
+               bool operator <(const struct wav& other) {
+                       return (strcasecmp(this->filename.c_str(),
+                                       other.filename.c_str()) < 0);
+               }
+
                bool operator ==(const struct wav& other) {
                        return (this->filename == other.filename ||
                                this->index == other.index);
@@ -125,6 +130,7 @@ private:
        void parserest10(void);
        void parseaudio5(void);
        void parseaudio(void);
+       void resort(std::vector<wav_t> *ws);
        std::vector<wav_t> actualwavs;
        float ratefactor;
        std::string extension;