Increase AUDxPER if it is really low after sample has looped.

This commit is contained in:
Toni Wilen 2024-01-22 18:50:43 +02:00
parent 90eed80115
commit cf3eb4bfe4

View File

@ -56,6 +56,7 @@
#define PERIOD_MIN 1
#define PERIOD_MIN_NONCE 60
#define PERIOD_MIN_LOOP 16
#define PERIOD_LOW 124
@ -2469,6 +2470,10 @@ void event_audxdat_func(uae_u32 v)
#endif
if (cdp->wlen == 1) {
cdp->wlen = cdp->len;
// if very low period sample repeats, set higher period value to not cause huge performance drop
if (cdp->per < PERIOD_MIN_LOOP * CYCLE_UNIT) {
cdp->per = PERIOD_MIN_LOOP * CYCLE_UNIT;
}
cdp->intreq2 = true;
if (sampleripper_enabled)
do_samplerip(cdp);