projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix crash when copy'ing latent plugins
[ardour.git]
/
libs
/
ptformat
/
ptfformat.h
diff --git
a/libs/ptformat/ptfformat.h
b/libs/ptformat/ptfformat.h
index e8267bcf59c7c439f2a3cb516801f8730cf82eff..3a702aa10bd257246f1fd21475c2c8d217861252 100644
(file)
--- a/
libs/ptformat/ptfformat.h
+++ b/
libs/ptformat/ptfformat.h
@@
-16,11
+16,13
@@
#define PTFFORMAT_H
#include <string>
#define PTFFORMAT_H
#include <string>
+#include <cstring>
#include <algorithm>
#include <vector>
#include <stdint.h>
#include <algorithm>
#include <vector>
#include <stdint.h>
+#include "ptformat/visibility.h"
-class PTFFormat {
+class
LIBPTFORMAT_API
PTFFormat {
public:
PTFFormat();
~PTFFormat();
public:
PTFFormat();
~PTFFormat();
@@
-30,19
+32,24
@@
public:
*/
int load(std::string path, int64_t targetsr);
*/
int load(std::string path, int64_t targetsr);
-
typedef struct wav
{
+
struct wav_t
{
std::string filename;
uint16_t index;
int64_t posabsolute;
int64_t length;
std::string filename;
uint16_t index;
int64_t posabsolute;
int64_t length;
- bool operator ==(const struct wav& other) {
- return (this->filename != std::string("") &&
+ bool operator <(const struct wav_t& other) const {
+ return (strcasecmp(this->filename.c_str(),
+ other.filename.c_str()) < 0);
+ }
+
+ bool operator ==(const struct wav_t& other) const {
+ return (this->filename == other.filename ||
this->index == other.index);
}
this->index == other.index);
}
- }
wav_t
;
+ };
typedef struct region {
std::string name;
typedef struct region {
std::string name;
@@
-106,12
+113,13
@@
public:
unsigned char c0;
unsigned char c1;
unsigned char *ptfunxored;
unsigned char c0;
unsigned char c1;
unsigned char *ptfunxored;
-
in
t len;
+
uint64_
t len;
private:
bool foundin(std::string haystack, std::string needle);
private:
bool foundin(std::string haystack, std::string needle);
-
void
parse(void);
+
int
parse(void);
void unxor10(void);
void unxor10(void);
+ void unxor_ptx_to_ptf(void);
void setrates(void);
void parse5header(void);
void parse7header(void);
void setrates(void);
void parse5header(void);
void parse7header(void);
@@
-123,6
+131,8
@@
private:
void parserest10(void);
void parseaudio5(void);
void parseaudio(void);
void parserest10(void);
void parseaudio5(void);
void parseaudio(void);
+ void resort(std::vector<wav_t>& ws);
+ uint8_t mostfrequent(uint32_t start, uint32_t stop);
std::vector<wav_t> actualwavs;
float ratefactor;
std::string extension;
std::vector<wav_t> actualwavs;
float ratefactor;
std::string extension;