use play position in mixing for curves

This commit is contained in:
bnnm 2020-07-26 17:19:01 +02:00
parent 57053ee348
commit 32fd4651df

View File

@ -119,6 +119,10 @@ static int is_active(mixing_data *data, int32_t current_start, int32_t current_e
static int32_t get_current_pos(VGMSTREAM* vgmstream, int32_t sample_count) {
int32_t current_pos;
if (vgmstream->config_enabled) {
return vgmstream->pstate.play_position;
}
if (vgmstream->loop_flag && vgmstream->loop_count > 0) {
int loop_pre = vgmstream->loop_start_sample; /* samples before looping */
int loop_into = (vgmstream->current_sample - vgmstream->loop_start_sample); /* samples after loop */