Skip to content

Commit

Permalink
sf3 fix
Browse files Browse the repository at this point in the history
fixed sf3 nans for real
i just gave up and added a check in the oscillator itself
  • Loading branch information
spessasus committed May 17, 2024
1 parent 3034155 commit 8842481
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export function getOscillatorData(voice, sampleData, outputBuffer)
}
else
{
// check and correct end errors
if(voice.sample.end >= sampleData.length)
{
voice.sample.end = sampleData.length - 1;
}
for (let i = 0; i < outputBuffer.length; i++) {

// linear interpolation
Expand Down

0 comments on commit 8842481

Please sign in to comment.