Attempt to reserve memory on samplePerBlock change
This commit is contained in:
parent
7b6c1c8106
commit
3f5a86e067
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,10 @@ void sfz::MidiState::advanceTime(int numSamples) noexcept
|
|||
void sfz::MidiState::setSamplesPerBlock(int samplesPerBlock) noexcept
|
||||
{
|
||||
this->samplesPerBlock = samplesPerBlock;
|
||||
for (auto& ccEvents: cc) {
|
||||
ccEvents.shrink_to_fit();
|
||||
ccEvents.reserve(samplesPerBlock);
|
||||
}
|
||||
}
|
||||
|
||||
float sfz::MidiState::getNoteDuration(int noteNumber, int delay) const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue