|
|
|
@@ -50,6 +50,11 @@ void SynthesiserVoice::setCurrentPlaybackSampleRate (const double newRate) |
|
|
|
currentSampleRate = newRate;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SynthesiserVoice::isVoiceActive() const
|
|
|
|
{
|
|
|
|
return getCurrentlyPlayingNote() >= 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SynthesiserVoice::clearCurrentNote()
|
|
|
|
{
|
|
|
|
currentlyPlayingNote = -1;
|
|
|
|
@@ -426,7 +431,7 @@ SynthesiserVoice* Synthesiser::findFreeVoice (SynthesiserSound* soundToPlay, |
|
|
|
{
|
|
|
|
SynthesiserVoice* const voice = voices.getUnchecked (i);
|
|
|
|
|
|
|
|
if (voice->getCurrentlyPlayingNote() < 0 && voice->canPlaySound (soundToPlay))
|
|
|
|
if ((! voice->isVoiceActive()) && voice->canPlaySound (soundToPlay))
|
|
|
|
return voice;
|
|
|
|
}
|
|
|
|
|
|
|
|
|