Unified · Split
| @@ -1241,7 +1241,7 @@ void tVZFilter_initToPool (tVZFilter* const vf, VZFilterType type, float · 1240 unmodified lines | ||
| 1241 | 1241 | |
| 1242 | 1242 | LEAF* leaf = f->mempool->leaf; |
| 1243 | 1243 | |
| 1244 | − f->fc = freq; | |
| 1244 | + f->fc = LEAF_clip(0.0f, freq, 0.5f * leaf->sampleRate); | |
| 1245 | 1245 | f->type = type; |
| 1246 | 1246 | f->G = ONE_OVER_SQRT2; |
| 1247 | 1247 | f->invG = 1.0f/ONE_OVER_SQRT2; |
| @@ -383,7 +383,8 @@ float tSampler_tick (tSampler* const sp) · 382 unmodified lines | ||
| 383 | 383 | buff[c3], |
| 384 | 384 | buff[c4], |
| 385 | 385 | alpha); |
| 386 | − crossfadeMix = (float) offset / (float) cfxlen; | |
| 386 | + if (cfxlen > 0.0f) crossfadeMix = (float) offset / (float) cfxlen; | |
| 387 | + else crossfadeMix = 0.0f; | |
| 387 | 388 | } |
| 388 | 389 | |
| 389 | 390 | float flipLength = fabsf(p->flipIdx - p->flipStart); |
| @@ -525,8 +526,6 @@ float tSampler_tick (tSampler* const sp) · 135 unmodified lines | ||
| 525 | 526 | } |
| 526 | 527 | } |
| 527 | 528 | |
| 528 | − | |
| 529 | − | |
| 530 | 529 | p->last = sample; |
| 531 | 530 | |
| 532 | 531 | |
| @@ -705,7 +704,8 @@ float tSampler_tickStereo (tSampler* const sp, float* outputArray) · 172 unmodified lines | ||
| 705 | 704 | buff[(f4 * p->channels) + 1], |
| 706 | 705 | falpha); |
| 707 | 706 | |
| 708 | − flipMix = (float) (cfxlen - flipLength) / (float) cfxlen; | |
| 707 | + if (cfxlen > 0) flipMix = (float) (cfxlen - flipLength) / (float) cfxlen; | |
| 708 | + else flipMix = 1.0f; | |
| 709 | 709 | } |
| 710 | 710 | } |
| 711 | 711 | |