Unified · Split
| @@ -230,10 +230,10 @@ float tSampler_tick (tSampler* const sp) · 229 unmodified lines | ||
| 230 | 230 | { |
| 231 | 231 | _tSampler* p = *sp; |
| 232 | 232 | |
| 233 | − if (p->active == 0) return 0.f; | |
| 234 | − | |
| 235 | 233 | attemptStartEndChange(sp); |
| 236 | 234 | |
| 235 | + if (p->active == 0) return 0.f; | |
| 236 | + | |
| 237 | 237 | if ((p->inc == 0.0f) || (p->len < 2)) |
| 238 | 238 | { |
| 239 | 239 | // p->inCrossfade = 1; |
| @@ -573,9 +573,8 @@ void tSampler_setStart (tSampler* const sp, int32_t start) · 333 unmodified lines | ||
| 573 | 573 | { |
| 574 | 574 | return; |
| 575 | 575 | } |
| 576 | − // if (p->active) | |
| 576 | + if (p->active) // only bother with these checks if we're actually playing | |
| 577 | 577 | { |
| 578 | − | |
| 579 | 578 | if (start > p->end) |
| 580 | 579 | { |
| 581 | 580 | tempflip = -1; |
| @@ -611,11 +610,10 @@ void tSampler_setStart (tSampler* const sp, int32_t start) · 29 unmodified lines | ||
| 611 | 610 | return; |
| 612 | 611 | } |
| 613 | 612 | } |
| 614 | − } | |
| 615 | − | |
| 616 | − if (tempflip != p->flip && p->flipStart < 0) | |
| 617 | − { | |
| 618 | − p->flipIdx = 0; | |
| 613 | + if (tempflip != p->flip && p->flipStart < 0) | |
| 614 | + { | |
| 615 | + p->flipIdx = 0; | |
| 616 | + } | |
| 619 | 617 | } |
| 620 | 618 | |
| 621 | 619 | p->start = LEAF_clipInt(0, start, p->samp->recordedLength-1); |
| @@ -634,10 +632,8 @@ void tSampler_setEnd (tSampler* const sp, int32_t end) · 12 unmodified lines | ||
| 634 | 632 | { |
| 635 | 633 | return; |
| 636 | 634 | } |
| 637 | − //if (p->active) | |
| 635 | + if (p->active) // only bother with these checks if we're actually playing | |
| 638 | 636 | { |
| 639 | − | |
| 640 | − | |
| 641 | 637 | if (p->start > end) |
| 642 | 638 | { |
| 643 | 639 | tempflip = -1; |
| @@ -673,11 +669,10 @@ void tSampler_setEnd (tSampler* const sp, int32_t end) · 29 unmodified lines | ||
| 673 | 669 | return; |
| 674 | 670 | } |
| 675 | 671 | } |
| 676 | − } | |
| 677 | − | |
| 678 | − if (tempflip != p->flip && p->flipStart < 0) | |
| 679 | − { | |
| 680 | − p->flipIdx = 0; | |
| 672 | + if (tempflip != p->flip && p->flipStart < 0) | |
| 673 | + { | |
| 674 | + p->flipIdx = 0; | |
| 675 | + } | |
| 681 | 676 | } |
| 682 | 677 | |
| 683 | 678 | p->end = LEAF_clipInt(0, end, p->samp->recordedLength-1); |