ogg vorbis: accept 'loop_end' for rare cases

This commit is contained in:
bnnm 2024-04-28 23:25:53 +02:00
parent 0617dd3190
commit c30ed29a3a
2 changed files with 6 additions and 3 deletions

View File

@ -137,9 +137,11 @@ to handle files with/out subsongs).
- `LOOP_START`: loop start, if any
- `LOOP_END`: loop end, if any
Those exported tags can be used as columns as well (*.. > Playlist view > custom columns*).
Exported tags can be used as columns as well (*.. > Playlist view > custom columns*),
and may be added as tags (which means *vgmstream* can play and loop an exported `.ogg`,
since those tags are inherited).
Example: `[%artist% - ]%title% [%stream_index%][/ %stream_name%]`
Custom title example: `[%artist% - ]%title% [%stream_index%][/ %stream_name%]`
You can also set an unique *Destination* pattern when converting to .wav (even without)
setting *override title*). For example `[$num(%stream_index%,2)] %filename%[-%stream_name%]`

View File

@ -663,8 +663,9 @@ static VGMSTREAM* _init_vgmstream_ogg_vorbis_config(STREAMFILE* sf, off_t start,
loop_length = atol(strrchr(comment,'=')+1);
loop_length_found = 1;
}
else if ( strstr(comment,"LoopEnd=") == comment /* (LoopStart pair) */
else if ( strstr(comment,"loop_end=") == comment /* (not seen but in case loop_start is used, to avoid full loops) */
|| strstr(comment,"LOOP_END=") == comment /* (LOOP_START/LOOP_BEGIN pair) */
|| strstr(comment,"LoopEnd=") == comment /* (LoopStart pair) */
|| strstr(comment, "XIPH_CUE_LOOPEND=") == comment /* (XIPH_CUE_LOOPSTART pair) */
|| strstr(comment, "LOOPE=") == comment /* (LOOPS pair) */
) {