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
174 174
175 if (p->active == 0) return 0.f;175 if (p->active == 0) return 0.f;
176 176
177 if ((p->inc == 0.0f) || (p->len < 4))177 if ((p->inc == 0.0f) || (p->len < 1))
178 {178 {
179 return p->last;179 return p->last;
180 }180 }
@@ -218,7 +218,7 @@ float tSampler_tick (tSampler* const sp) · 37 unmodified lines
218 int i4 = (idx+2) % p->len;218 int i4 = (idx+2) % p->len;
219 219
220 sample = LEAF_interpolate_hermite (buff[i1],220 sample = LEAF_interpolate_hermite (buff[i1],
221 buff[idx],221 buff[idx%p->len],
222 buff[i3],222 buff[i3],
223 buff[i4],223 buff[i4],
224 alpha);224 alpha);
@@ -258,7 +258,7 @@ float tSampler_tick (tSampler* const sp) · 33 unmodified lines
258 int i4 = ((idx-2) + p->len) % p->len;258 int i4 = ((idx-2) + p->len) % p->len;
259 259
260 sample = LEAF_interpolate_hermite (buff[i1],260 sample = LEAF_interpolate_hermite (buff[i1],
261 buff[idx],261 buff[idx%p->len],
262 buff[i3],262 buff[i3],
263 buff[i4],263 buff[i4],
264 1.0f-alpha);264 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