mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-17 19:19:16 +01:00
Fix TXTP "c" command and add "C" (@track alt)
This commit is contained in:
parent
57d724c2b2
commit
43d3cea838
@ -134,6 +134,12 @@ music_Home.ps3.scd#c1~3
|
||||
```
|
||||
Doesn't change the final number of channels though, just mutes non-selected channels.
|
||||
|
||||
If you use **`C(number)`** it will remove non-selected channels (not done directly for backwards compatibility). This just a shortcut for macro `#@track` (described later):
|
||||
```
|
||||
#plays channels 3 and 4 = 2nd subsong and removes other channels
|
||||
music_Home.ps3.scd#C3 4
|
||||
```
|
||||
|
||||
|
||||
### Custom play settings
|
||||
**`#l(loops)`**, **`#f(fade)`**, **`#d(fade-delay)`**, **`#i(ignore loop)`**, **`#F(ignore fade)`**, **`#E(end-to-end loop)`**
|
||||
|
@ -285,7 +285,7 @@ static void apply_config(VGMSTREAM *vgmstream, txtp_entry *current) {
|
||||
for (ch = 0; ch < vgmstream->channels; ch++) {
|
||||
if (!((current->channel_mask >> ch) & 1)) {
|
||||
txtp_mix_data mix = {0};
|
||||
mix.ch_dst = ch;
|
||||
mix.ch_dst = ch + 1;
|
||||
mix.vol = 0.0f;
|
||||
add_mixing(current, &mix, MIX_VOLUME);
|
||||
}
|
||||
@ -880,7 +880,8 @@ static int add_filename(txtp_header * txtp, char *filename, int is_default) {
|
||||
|
||||
add_mixing(&cfg, &mix, MACRO_VOLUME);
|
||||
}
|
||||
else if (strcmp(command,"@track") == 0) {
|
||||
else if (strcmp(command,"@track") == 0 ||
|
||||
strcmp(command,"C") == 0 ) {
|
||||
txtp_mix_data mix = {0};
|
||||
|
||||
nm = get_mask(config, &mix.mask);
|
||||
@ -930,7 +931,9 @@ static int add_filename(txtp_header * txtp, char *filename, int is_default) {
|
||||
}
|
||||
else {
|
||||
//;VGM_LOG("TXTP: unknown command\n");
|
||||
break; /* end, incorrect command, or possibly a comment or double ## comment too */
|
||||
/* end, incorrect command, or possibly a comment or double ## comment too
|
||||
* (shouldn't fail for forward compatibility) */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user