diff options
author | Damien Zammit <damien@zamaudio.com> | 2015-07-25 04:04:20 +1000 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2015-07-25 04:04:20 +1000 |
commit | 2387a9507be78e2d8da06408c60446b31a7b4810 (patch) | |
tree | b473e69a61790d4c14397b80d2b5b9c343ce4b8f | |
parent | 89076e00d8a343dcb540af2c4edef2fdc92c30cb (diff) |
Fixed all offsets
Signed-off-by: Damien Zammit <damien@zamaudio.com>
-rw-r--r-- | ptfformat.cc | 10 | ||||
-rw-r--r-- | ptftool.cc | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/ptfformat.cc b/ptfformat.cc index 04d6348..c0651ae 100644 --- a/ptfformat.cc +++ b/ptfformat.cc @@ -266,9 +266,9 @@ PTFFormat::parse(void) { break; } } - startbytes = (ptfunxored[j+3] & 0xf); - lengthbytes = (ptfunxored[j+2] & 0xf0) >> 4; - offsetbytes = (ptfunxored[j+2] & 0xf); + lengthbytes = (ptfunxored[j+3] & 0xf0) >> 4; + startbytes = (ptfunxored[j+2] & 0xf0) >> 4; + offsetbytes = (ptfunxored[j+3] & 0xf); if (type == 1) { uint32_t start = 0; @@ -316,8 +316,8 @@ PTFFormat::parse(void) { files_t f = { filename, (int64_t)sampleoffset, - (int64_t)length, - (int64_t)start + (int64_t)start, + (int64_t)length }; vector<files_t>::iterator begin = this->actualwavs.begin(); vector<files_t>::iterator finish = this->actualwavs.end(); @@ -40,8 +40,8 @@ int main (int argc, char **argv) { a = ptf.audiofiles.begin(); a != ptf.audiofiles.end(); ++a) { //printf("%s @ 0x%08x + 0x%08x, len=0x%08x\n", a->filename.c_str(), - printf("%s @ %lu + %lu, len=%lu\n", a->filename.c_str(), - a->posabsolute, a->sampleoffset, a->length); + printf("%s @ %lu, len=%lu\n", a->filename.c_str(), + a->posabsolute, a->length); } printf("\nOther track @ offset:\n"); for (vector<PTFFormat::files_t>::iterator |