mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
Allow TXTH chunks + subfiles + subsongs [Gitaroo Man (PSP)]
This commit is contained in:
parent
0fa7ed0b6f
commit
88951a1ab2
18
doc/TXTH.md
18
doc/TXTH.md
@ -512,7 +512,7 @@ num_samples = data_size
|
||||
### Chunks
|
||||
Chunks affect some values (padding size, data size, etc) and are a bit sensitive to order at the moment, due to technical complexities:
|
||||
```
|
||||
# Street Fighter EX3
|
||||
# Street Fighter EX3 (PS2)
|
||||
|
||||
# base config is defined normally
|
||||
codec = PSX
|
||||
@ -532,3 +532,19 @@ start_offset = 0x00
|
||||
padding_size = auto-empty
|
||||
num_samples = data_size
|
||||
```
|
||||
|
||||
Subfiles and chunks can coexist:
|
||||
```
|
||||
# Gitaroo Man (PSP)
|
||||
|
||||
# 3 interleaved RIFF files
|
||||
subsong_count = 3
|
||||
chunk_start = 0
|
||||
chunk_size = 0x2800
|
||||
chunk_count = 3
|
||||
|
||||
# the 3 de-interleaved chunks are treated and parsed as a subsong
|
||||
subfile_offset = 0
|
||||
subfile_size = @0x04 + 0x08 #RIFF size
|
||||
subfile_extension = at3
|
||||
```
|
||||
|
@ -557,6 +557,12 @@ static VGMSTREAM *init_subfile(txth_header * txth) {
|
||||
vgmstream_force_loop(vgmstream, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (txth->chunk_count && txth->subsong_count) {
|
||||
vgmstream->num_streams = txth->subsong_count;
|
||||
}
|
||||
//todo: other combos with subsongs + subfile?
|
||||
|
||||
|
||||
close_streamfile(streamSubfile);
|
||||
return vgmstream;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user