mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added some return values for a couple of Synthesiser methods.
This commit is contained in:
parent
09d626eafa
commit
677b9ab530
2 changed files with 8 additions and 8 deletions
|
|
@ -90,10 +90,10 @@ void Synthesiser::clearVoices()
|
|||
voices.clear();
|
||||
}
|
||||
|
||||
void Synthesiser::addVoice (SynthesiserVoice* const newVoice)
|
||||
SynthesiserVoice* Synthesiser::addVoice (SynthesiserVoice* const newVoice)
|
||||
{
|
||||
const ScopedLock sl (lock);
|
||||
voices.add (newVoice);
|
||||
return voices.add (newVoice);
|
||||
}
|
||||
|
||||
void Synthesiser::removeVoice (const int index)
|
||||
|
|
@ -108,10 +108,10 @@ void Synthesiser::clearSounds()
|
|||
sounds.clear();
|
||||
}
|
||||
|
||||
void Synthesiser::addSound (const SynthesiserSound::Ptr& newSound)
|
||||
SynthesiserSound* Synthesiser::addSound (const SynthesiserSound::Ptr& newSound)
|
||||
{
|
||||
const ScopedLock sl (lock);
|
||||
sounds.add (newSound);
|
||||
return sounds.add (newSound);
|
||||
}
|
||||
|
||||
void Synthesiser::removeSound (const int index)
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ public:
|
|||
it later on when no longer needed. The caller should not retain a pointer to the
|
||||
voice.
|
||||
*/
|
||||
void addVoice (SynthesiserVoice* newVoice);
|
||||
SynthesiserVoice* addVoice (SynthesiserVoice* newVoice);
|
||||
|
||||
/** Deletes one of the voices. */
|
||||
void removeVoice (int index);
|
||||
|
|
@ -311,10 +311,10 @@ public:
|
|||
|
||||
/** Adds a new sound to the synthesiser.
|
||||
|
||||
The object passed in is reference counted, so will be deleted when it is removed
|
||||
from the synthesiser, and when no voices are still using it.
|
||||
The object passed in is reference counted, so will be deleted when the
|
||||
synthesiser and all voices are no longer using it.
|
||||
*/
|
||||
void addSound (const SynthesiserSound::Ptr& newSound);
|
||||
SynthesiserSound* addSound (const SynthesiserSound::Ptr& newSound);
|
||||
|
||||
/** Removes and deletes one of the sounds. */
|
||||
void removeSound (int index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue