ptformat: Update to upstream 232ba25
This commit is contained in:
parent
ec5a809f54
commit
0890b638b9
|
@ -665,7 +665,8 @@ PTFFormat::parsestring (uint32_t pos) {
|
||||||
bool
|
bool
|
||||||
PTFFormat::parseaudio(void) {
|
PTFFormat::parseaudio(void) {
|
||||||
bool found = false;
|
bool found = false;
|
||||||
uint32_t nwavs, i, n;
|
uint32_t nwavs = 0;
|
||||||
|
uint32_t i, n;
|
||||||
uint32_t pos = 0;
|
uint32_t pos = 0;
|
||||||
std::string wavtype;
|
std::string wavtype;
|
||||||
std::string wavname;
|
std::string wavname;
|
||||||
|
@ -680,7 +681,6 @@ PTFFormat::parseaudio(void) {
|
||||||
for (vector<PTFFormat::block_t>::iterator c = b->child.begin();
|
for (vector<PTFFormat::block_t>::iterator c = b->child.begin();
|
||||||
c != b->child.end(); ++c) {
|
c != b->child.end(); ++c) {
|
||||||
if (c->content_type == 0x103a) {
|
if (c->content_type == 0x103a) {
|
||||||
found = true;
|
|
||||||
//nstrings = u_endian_read4(&_ptfunxored[c->offset+1], is_bigendian);
|
//nstrings = u_endian_read4(&_ptfunxored[c->offset+1], is_bigendian);
|
||||||
pos = c->offset + 11;
|
pos = c->offset + 11;
|
||||||
// Found wav list
|
// Found wav list
|
||||||
|
@ -706,7 +706,7 @@ PTFFormat::parseaudio(void) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (wavtype.size() != 0) {
|
if (wavtype[0] != '\0') {
|
||||||
if (!(foundin(wavtype, std::string("WAVE")) ||
|
if (!(foundin(wavtype, std::string("WAVE")) ||
|
||||||
foundin(wavtype, std::string("EVAW")) ||
|
foundin(wavtype, std::string("EVAW")) ||
|
||||||
foundin(wavtype, std::string("AIFF")) ||
|
foundin(wavtype, std::string("AIFF")) ||
|
||||||
|
@ -718,6 +718,7 @@ PTFFormat::parseaudio(void) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
found = true;
|
||||||
wav_t f (n);
|
wav_t f (n);
|
||||||
f.filename = wavname;
|
f.filename = wavname;
|
||||||
n++;
|
n++;
|
||||||
|
@ -728,6 +729,14 @@ PTFFormat::parseaudio(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
if (nwavs > 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add wav length information
|
// Add wav length information
|
||||||
for (vector<PTFFormat::block_t>::iterator b = blocks.begin();
|
for (vector<PTFFormat::block_t>::iterator b = blocks.begin();
|
||||||
b != blocks.end(); ++b) {
|
b != blocks.end(); ++b) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user