Skip to content

Commit

Permalink
final patch (hopefully) to out of range samples
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed May 17, 2024
1 parent ff9c2d0 commit 2428221
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ChannelProcessor extends AudioWorkletProcessor {
{
return;
}
v.sample.end = data.sampleData.length + v.generators[generatorTypes.endAddrOffset] + (v.generators[generatorTypes.endAddrsCoarseOffset] * 32768);
v.sample.end = data.sampleData.length - 1 + v.generators[generatorTypes.endAddrOffset] + (v.generators[generatorTypes.endAddrsCoarseOffset] * 32768);
})

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export class WorkletChannel {
rootKey: rootKey,
loopStart: loopStart,
loopEnd: loopEnd,
end: Math.floor( sampleAndGenerators.sample.sampleData.length) + (generators[generatorTypes.endAddrOffset] + (generators[generatorTypes.endAddrsCoarseOffset] * 32768)),
end: Math.floor( sampleAndGenerators.sample.sampleData.length) - 1 + (generators[generatorTypes.endAddrOffset] + (generators[generatorTypes.endAddrsCoarseOffset] * 32768)),
loopingMode: loopingMode
};

Expand Down

0 comments on commit 2428221

Please sign in to comment.