fix: end / begin. sampler now needs clip to choose duration...
This commit is contained in:
parent
7556da7839
commit
96eef75f74
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue