History

fix sampler clicks when using short loop/high rate

Matthew Wang committed 6 years ago

Commit ee1acb61 parent 730c1421 file · +3 −3Browse files

Unified · Split

LEAF/Src/leaf-sampling.c+3−3
@@ -174,7 +174,7 @@ float tSampler_tick (tSampler* const sp) · 173 unmodified lines
174174
175175 if (p->active == 0) return 0.f;
176176
177− if ((p->inc == 0.0f) || (p->len < 4))
177+ if ((p->inc == 0.0f) || (p->len < 1))
178178 {
179179 return p->last;
180180 }
@@ -218,7 +218,7 @@ float tSampler_tick (tSampler* const sp) · 37 unmodified lines
218218 int i4 = (idx+2) % p->len;
219219
220220 sample = LEAF_interpolate_hermite (buff[i1],
221− buff[idx],
221+ buff[idx%p->len],
222222 buff[i3],
223223 buff[i4],
224224 alpha);
@@ -258,7 +258,7 @@ float tSampler_tick (tSampler* const sp) · 33 unmodified lines
258258 int i4 = ((idx-2) + p->len) % p->len;
259259
260260 sample = LEAF_interpolate_hermite (buff[i1],
261− buff[idx],
261+ buff[idx%p->len],
262262 buff[i3],
263263 buff[i4],
264264 1.0f-alpha);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t