Fix Ogg looping with wrong granules properly [Aristear Remain (PC)]

This commit is contained in:
bnnm 2021-03-15 22:48:43 +01:00
parent 100c861b03
commit 46c9146f34
2 changed files with 3 additions and 3 deletions

View File

@ -201,8 +201,8 @@ void decode_ogg_vorbis(ogg_vorbis_codec_data* data, sample_t* outbuf, int32_t sa
pcm_convert_float_to_16(channels, outbuf, start, rc, pcm_channels, data->disable_reordering);
outbuf += rc * channels;
samples_done += rc;
outbuf += (rc - start) * channels;
samples_done += (rc - start);
#if 0 // alt decoding

View File

@ -545,7 +545,7 @@ VGMSTREAM* init_vgmstream_ogg_vorbis_callbacks(STREAMFILE* sf, ov_callbacks* cal
loop_flag = (loop_start >= 0);
}
else if (strstr(comment,"COMMENT=- loopTime ") == comment) { /* Aristear Remain (PC) */
loop_start = atol(strrchr(comment,' ')+1) * sample_rate / 1000.0f; /* ms to samples */
loop_start = atol(strrchr(comment,' ')+1) / 1000.0f * sample_rate; /* ms to samples */
loop_flag = (loop_start >= 0);
/* files have all page granule positions -1 except a few close to loop. This throws off