Corrected a bug when changing the number of voices where the voices were not completely prepped
This commit is contained in:
parent
e65ea37d7a
commit
19171fae14
1 changed files with 6 additions and 0 deletions
|
|
@ -532,6 +532,12 @@ void sfz::Synth::resetVoices(int numVoices)
|
|||
voices.clear();
|
||||
for (int i = 0; i < numVoices; ++i)
|
||||
voices.push_back(std::make_unique<Voice>(midiState));
|
||||
|
||||
for (auto& voice: voices) {
|
||||
voice->setSampleRate(this->sampleRate);
|
||||
voice->setSamplesPerBlock(this->samplesPerBlock);
|
||||
}
|
||||
|
||||
voiceViewArray.reserve(numVoices);
|
||||
this->numVoices = numVoices;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue