diff options
author | Damien Zammit <damien@zamaudio.com> | 2018-10-14 15:08:55 +1100 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2018-12-15 23:50:53 +1100 |
commit | 877fa2812ff7c1854cd2a255108fd351b9c4d7d4 (patch) | |
tree | 037b03104cb24e08890c9d37949919abedcfaac9 /ptformat | |
parent | 1ce8c548b99e00d727924e8b653c32da33857a21 (diff) |
More endian resilient && add more pt5 support for failing sessions
Diffstat (limited to 'ptformat')
-rw-r--r-- | ptformat/ptfformat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ptformat/ptfformat.h b/ptformat/ptfformat.h index 933d2be..72dc64c 100644 --- a/ptformat/ptfformat.h +++ b/ptformat/ptfformat.h @@ -153,12 +153,18 @@ public: unsigned char c1; unsigned char *ptfunxored; uint64_t len; + bool is_bigendian; private: bool jumpback(uint32_t *currpos, unsigned char *buf, const uint32_t maxoffset, const unsigned char *needle, const uint32_t needlelen); bool jumpto(uint32_t *currpos, unsigned char *buf, const uint32_t maxoffset, const unsigned char *needle, const uint32_t needlelen); bool foundin(std::string haystack, std::string needle); int64_t foundat(unsigned char *haystack, uint64_t n, const char *needle); + uint16_t u_endian_read2(unsigned char *buf, bool); + uint32_t u_endian_read3(unsigned char *buf, bool); + uint32_t u_endian_read4(unsigned char *buf, bool); + uint64_t u_endian_read5(unsigned char *buf, bool); + int parse(void); bool parse_version(); uint8_t gen_xor_delta(uint8_t xor_value, uint8_t mul, bool negative); @@ -182,6 +188,7 @@ private: std::vector<wav_t> actualwavs; float ratefactor; std::string extension; + uint32_t upto; }; |