Exemplo n.º 1
0
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
    }
}
Exemplo n.º 2
0
void MPESynthesiserVoice::clearCurrentNote() noexcept
{
    currentlyPlayingNote = MPENote();
}