void MPESynthesiser::reduceNumVoices (const int newNumVoices) { // we can't possibly get to a negative number of voices... jassert (newNumVoices >= 0); const ScopedLock sl (voicesLock); while (voices.size() > newNumVoices) { if (MPESynthesiserVoice* voice = findFreeVoice (MPENote(), true)) voices.removeObject (voice); else voices.remove (0); // if there's no voice to steal, kill the oldest voice } }
void MPESynthesiserVoice::clearCurrentNote() noexcept { currentlyPlayingNote = MPENote(); }