mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 20:18:34 +00:00
fix: end / begin. sampler now needs clip to choose duration...
This commit is contained in:
parent
7556da7839
commit
96eef75f74
@ -306,7 +306,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) {
|
|||||||
bufferSource.start(time, offset);
|
bufferSource.start(time, offset);
|
||||||
const envGain = ac.createGain();
|
const envGain = ac.createGain();
|
||||||
const node = bufferSource.connect(envGain);
|
const node = bufferSource.connect(envGain);
|
||||||
if (duration == null && clip == null && loop == null && value.release == null) {
|
if (clip == null && loop == null && value.release == null) {
|
||||||
const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value;
|
const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value;
|
||||||
duration = (end - begin) * bufferDuration;
|
duration = (end - begin) * bufferDuration;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user