copy voice if there are more that 0 voices
This commit is contained in:
@@ -22,8 +22,12 @@ public:
|
||||
{
|
||||
if (voice_count > voicePtrs.size()) {
|
||||
for (int i = voicePtrs.size(); i < voice_count; ++i) {
|
||||
if (voicePtrs.size() > 0) {
|
||||
voicePtrs.emplace_back(std::make_shared<t_voice>(*voicePtrs.at(0)));
|
||||
} else {
|
||||
voicePtrs.emplace_back(std::make_shared<t_voice>());
|
||||
}
|
||||
}
|
||||
} else if (voice_count < voicePtrs.size()) {
|
||||
voicePtrs.resize(voice_count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user