bring crash fix from 0.5.8

This commit is contained in:
tildearrow 2022-02-24 22:52:20 -05:00
parent dee74e7b14
commit 19c4f5559a
11 changed files with 33 additions and 25 deletions

View file

@ -623,6 +623,11 @@ DivWavetable* DivEngine::getWave(int index) {
return song.wave[index];
}
DivSample* DivEngine::getSample(int index) {
if (index<0 || index>=song.sampleLen) return &song.nullSample;
return song.sample[index];
}
void DivEngine::setLoops(int loops) {
remainingLoops=loops;
}