mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
cb9af5ef56
commit
8987fe888c
3 changed files with 39 additions and 14 deletions
|
|
@ -8,6 +8,7 @@ Changelist for version 1.46
|
|||
|
||||
- new class: AudioProcessorGraph: This allows AudioProcessors to be efficiently wired together and run as a graph. I've converted the plugin host demo to now use this instead of its own graph rendering code.
|
||||
- new class: AudioProcessorPlayer: This allows an audio i/o device to stream through an AudioProcessor (or an AudioProcessorGraph).
|
||||
- new class QuickTimeAudioFormat, which uses QuickTime to implement an AudioFormat that can read .mov files and other formats that QT supports (e.g. mp3, aac, etc)
|
||||
- AudioProcessor now has a few more pure virtual methods that you'll need to implement: acceptsMidi(), producesMidi() and getName()
|
||||
- moved all the audio plugin hosting classes into the main juce tree
|
||||
- Mac: the project now requires at least XCode V2.5
|
||||
|
|
|
|||
|
|
@ -239,9 +239,19 @@ void Synthesiser::noteOn (const int midiChannel,
|
|||
if (sound->appliesToNote (midiNoteNumber)
|
||||
&& sound->appliesToChannel (midiChannel))
|
||||
{
|
||||
SynthesiserVoice* const voice = findFreeVoice (sound, shouldStealNotes);
|
||||
startVoice (findFreeVoice (sound, shouldStealNotes),
|
||||
sound, midiChannel, midiNoteNumber, velocity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (voice != 0)
|
||||
void Synthesiser::startVoice (SynthesiserVoice* const voice,
|
||||
SynthesiserSound* const sound,
|
||||
const int midiChannel,
|
||||
const int midiNoteNumber,
|
||||
const float velocity)
|
||||
{
|
||||
if (voice != 0 && sound != 0)
|
||||
{
|
||||
voice->startNote (midiNoteNumber,
|
||||
velocity,
|
||||
|
|
@ -252,8 +262,6 @@ void Synthesiser::noteOn (const int midiChannel,
|
|||
voice->noteOnTime = ++lastNoteOnCounter;
|
||||
voice->currentlyPlayingSound = sound;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Synthesiser::noteOff (const int midiChannel,
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ protected:
|
|||
*/
|
||||
void clearCurrentNote();
|
||||
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
friend class Synthesiser;
|
||||
|
|
@ -330,6 +331,11 @@ public:
|
|||
*/
|
||||
void setNoteStealingEnabled (const bool shouldStealNotes);
|
||||
|
||||
/** Returns true if note-stealing is enabled.
|
||||
@see setNoteStealingEnabled
|
||||
*/
|
||||
bool isNoteStealingEnabled() const throw() { return shouldStealNotes; }
|
||||
|
||||
//==============================================================================
|
||||
/** Triggers a note-on event.
|
||||
|
||||
|
|
@ -457,6 +463,16 @@ protected:
|
|||
virtual SynthesiserVoice* findFreeVoice (SynthesiserSound* soundToPlay,
|
||||
const bool stealIfNoneAvailable) const;
|
||||
|
||||
/** Starts a specified voice playing a particular sound.
|
||||
|
||||
You'll probably never need to call this, it's used internally by noteOn(), but
|
||||
may be needed by subclasses for custom behaviours.
|
||||
*/
|
||||
void startVoice (SynthesiserVoice* const voice,
|
||||
SynthesiserSound* const sound,
|
||||
const int midiChannel,
|
||||
const int midiNoteNumber,
|
||||
const float velocity);
|
||||
|
||||
/** xxx Temporary method here to cause a compiler error - note the new parameters for this method. */
|
||||
int findFreeVoice (const bool) const { return 0; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue