mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 09:37:21 +01:00
txth: extra usable fields just in case
This commit is contained in:
parent
9b75cc6d83
commit
878b253c76
@ -1062,6 +1062,7 @@ static int parse_keyval(STREAMFILE* sf_, txth_header* txth, const char* key, cha
|
|||||||
/* apply */
|
/* apply */
|
||||||
if (!txth->data_size_set) {
|
if (!txth->data_size_set) {
|
||||||
|
|
||||||
|
//TODO: this doesn't work when using name_table + subsongs, since values are pre-read
|
||||||
/* with subsongs we want to clamp data_size from this subsong start to next subsong start */
|
/* with subsongs we want to clamp data_size from this subsong start to next subsong start */
|
||||||
txth->next_offset = txth->data_size;
|
txth->next_offset = txth->data_size;
|
||||||
if (txth->subsong_count > 1 && txth->target_subsong < txth->subsong_count) {
|
if (txth->subsong_count > 1 && txth->target_subsong < txth->subsong_count) {
|
||||||
@ -1919,6 +1920,7 @@ static int parse_num(STREAMFILE* sf, txth_header* txth, const char* val, uint32_
|
|||||||
else if ((n = is_string_field(val,"sample_rate"))) value = txth->sample_rate;
|
else if ((n = is_string_field(val,"sample_rate"))) value = txth->sample_rate;
|
||||||
else if ((n = is_string_field(val,"start_offset"))) value = txth->start_offset;
|
else if ((n = is_string_field(val,"start_offset"))) value = txth->start_offset;
|
||||||
else if ((n = is_string_field(val,"data_size"))) value = txth->data_size;
|
else if ((n = is_string_field(val,"data_size"))) value = txth->data_size;
|
||||||
|
else if ((n = is_string_field(val,"padding_size"))) value = txth->padding_size;
|
||||||
else if ((n = is_string_field(val,"num_samples"))) value = txth->num_samples;
|
else if ((n = is_string_field(val,"num_samples"))) value = txth->num_samples;
|
||||||
else if ((n = is_string_field(val,"loop_start_sample"))) value = txth->loop_start_sample;
|
else if ((n = is_string_field(val,"loop_start_sample"))) value = txth->loop_start_sample;
|
||||||
else if ((n = is_string_field(val,"loop_start"))) value = txth->loop_start_sample;
|
else if ((n = is_string_field(val,"loop_start"))) value = txth->loop_start_sample;
|
||||||
@ -1932,7 +1934,16 @@ static int parse_num(STREAMFILE* sf, txth_header* txth, const char* val, uint32_
|
|||||||
else if ((n = is_string_field(val,"subfile_size"))) value = txth->subfile_size;
|
else if ((n = is_string_field(val,"subfile_size"))) value = txth->subfile_size;
|
||||||
else if ((n = is_string_field(val,"base_offset"))) value = txth->base_offset;
|
else if ((n = is_string_field(val,"base_offset"))) value = txth->base_offset;
|
||||||
else if ((n = is_string_field(val,"coef_offset"))) value = txth->coef_offset;
|
else if ((n = is_string_field(val,"coef_offset"))) value = txth->coef_offset;
|
||||||
|
else if ((n = is_string_field(val,"coef_spacing"))) value = txth->coef_spacing;
|
||||||
else if ((n = is_string_field(val,"hist_offset"))) value = txth->hist_offset;
|
else if ((n = is_string_field(val,"hist_offset"))) value = txth->hist_offset;
|
||||||
|
else if ((n = is_string_field(val,"hist_spacing"))) value = txth->hist_spacing;
|
||||||
|
else if ((n = is_string_field(val,"chunk_count"))) value = txth->chunk_count;
|
||||||
|
else if ((n = is_string_field(val,"chunk_start"))) value = txth->chunk_start;
|
||||||
|
else if ((n = is_string_field(val,"chunk_size"))) value = txth->chunk_size;
|
||||||
|
else if ((n = is_string_field(val,"chunk_size_offset"))) value = txth->chunk_size_offset;
|
||||||
|
else if ((n = is_string_field(val,"chunk_number"))) value = txth->chunk_number;
|
||||||
|
else if ((n = is_string_field(val,"chunk_data_size"))) value = txth->chunk_data_size;
|
||||||
|
else if ((n = is_string_field(val,"chunk_header_size"))) value = txth->chunk_header_size;
|
||||||
//todo whatever, improve
|
//todo whatever, improve
|
||||||
else if ((n = is_string_field(val,"name_value"))) value = txth->name_values[0];
|
else if ((n = is_string_field(val,"name_value"))) value = txth->name_values[0];
|
||||||
else if ((n = is_string_field(val,"name_value1"))) value = txth->name_values[0];
|
else if ((n = is_string_field(val,"name_value1"))) value = txth->name_values[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user