mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed a few small bugs and added some comments in Synthesiser, MPESynthesiser, and MPETest demo app.
This commit is contained in:
parent
8cab6c7356
commit
08a0bada12
4 changed files with 19 additions and 7 deletions
|
|
@ -114,6 +114,7 @@ void Synthesiser::clearVoices()
|
|||
SynthesiserVoice* Synthesiser::addVoice (SynthesiserVoice* const newVoice)
|
||||
{
|
||||
const ScopedLock sl (lock);
|
||||
newVoice->setCurrentPlaybackSampleRate (sampleRate);
|
||||
return voices.add (newVoice);
|
||||
}
|
||||
|
||||
|
|
@ -557,6 +558,9 @@ SynthesiserVoice* Synthesiser::findVoiceToSteal (SynthesiserSound* soundToPlay,
|
|||
// - Re-use the oldest notes first
|
||||
// - Protect the lowest & topmost notes, even if sustained, but not if they've been released.
|
||||
|
||||
// apparently you are trying to render audio without having any voices...
|
||||
jassert (voices.size() > 0);
|
||||
|
||||
// These are the voices we want to protect (ie: only steal if unavoidable)
|
||||
SynthesiserVoice* low = nullptr; // Lowest sounding note, might be sustained, but NOT in release phase
|
||||
SynthesiserVoice* top = nullptr; // Highest sounding note, might be sustained, but NOT in release phase
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue