| @@ -173,11 +173,10 @@ static Array <VSTPluginWindow*> activeWindows; | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| namespace JUCE_NAMESPACE | |||||
| { | |||||
| extern bool juce_isHIViewCreatedByJuce (HIViewRef view); | |||||
| extern bool juce_isWindowCreatedByJuce (WindowRef window); | |||||
| } | |||||
| BEGIN_JUCE_NAMESPACE | |||||
| extern bool juce_isHIViewCreatedByJuce (HIViewRef view); | |||||
| extern bool juce_isWindowCreatedByJuce (WindowRef window); | |||||
| END_JUCE_NAMESPACE | |||||
| #if JUCE_PPC | #if JUCE_PPC | ||||
| static void* NewCFMFromMachO (void* const machofp) throw() | static void* NewCFMFromMachO (void* const machofp) throw() | ||||
| @@ -791,8 +790,6 @@ void VSTPluginInstance::prepareToPlay (double sampleRate_, | |||||
| setLatencySamples (effect->initialDelay); | setLatencySamples (effect->initialDelay); | ||||
| midiCollector.reset (sampleRate_); | |||||
| juce_free (channels); | juce_free (channels); | ||||
| channels = (float**) juce_calloc (sizeof (float*) * jmax (16, getNumOutputChannels() + 2, getNumInputChannels() + 2)); | channels = (float**) juce_calloc (sizeof (float*) * jmax (16, getNumOutputChannels() + 2, getNumInputChannels() + 2)); | ||||
| @@ -845,7 +842,6 @@ void VSTPluginInstance::releaseResources() | |||||
| setPower (false); | setPower (false); | ||||
| } | } | ||||
| midiCollector.reset (getSampleRate()); | |||||
| tempBuffer.setSize (1, 1); | tempBuffer.setSize (1, 1); | ||||
| incomingMidi.clear(); | incomingMidi.clear(); | ||||
| @@ -1076,7 +1072,7 @@ public: | |||||
| closePluginWindow(); | closePluginWindow(); | ||||
| activeWindows.removeValue (this); | activeWindows.removeValue (this); | ||||
| plugin.editorBeingDeleted (this); | |||||
| plugin.editorBeingDeleted (this); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -57,7 +57,7 @@ struct fxProgram; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** | /** | ||||
| An instance of a plugin, created by a VSTPluginType. | |||||
| An instance of a plugin, created by a VSTPluginFormat. | |||||
| */ | */ | ||||
| class VSTPluginInstance : public AudioPluginInstance, | class VSTPluginInstance : public AudioPluginInstance, | ||||
| @@ -128,7 +128,6 @@ public: | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| private: | private: | ||||
| friend class VSTPluginType; | |||||
| friend class VSTPluginWindow; | friend class VSTPluginWindow; | ||||
| friend class VSTPluginFormat; | friend class VSTPluginFormat; | ||||
| @@ -137,7 +136,6 @@ private: | |||||
| CriticalSection lock; | CriticalSection lock; | ||||
| bool wantsMidiMessages, initialised, isPowerOn; | bool wantsMidiMessages, initialised, isPowerOn; | ||||
| mutable StringArray programNames; | mutable StringArray programNames; | ||||
| MidiMessageCollector midiCollector; | |||||
| AudioSampleBuffer tempBuffer; | AudioSampleBuffer tempBuffer; | ||||
| CriticalSection midiInLock; | CriticalSection midiInLock; | ||||
| MidiBuffer incomingMidi; | MidiBuffer incomingMidi; | ||||
| @@ -33,7 +33,6 @@ | |||||
| #define __JUCE_FONT_JUCEHEADER__ | #define __JUCE_FONT_JUCEHEADER__ | ||||
| #include "juce_Typeface.h" | #include "juce_Typeface.h" | ||||
| #include "../geometry/juce_Path.h" | |||||
| #include "../../../../juce_core/text/juce_StringArray.h" | #include "../../../../juce_core/text/juce_StringArray.h" | ||||
| #include "../../../../juce_core/containers/juce_ReferenceCountedObject.h" | #include "../../../../juce_core/containers/juce_ReferenceCountedObject.h" | ||||
| #include "../../../../juce_core/containers/juce_OwnedArray.h" | #include "../../../../juce_core/containers/juce_OwnedArray.h" | ||||
| @@ -277,57 +277,53 @@ const Path* Typeface::getOutlineForGlyph (const juce_wchar character) throw() | |||||
| const TypefaceGlyphInfo* Typeface::getGlyph (const juce_wchar character) throw() | const TypefaceGlyphInfo* Typeface::getGlyph (const juce_wchar character) throw() | ||||
| { | { | ||||
| if (character > 0 && character < 128 && lookupTable [character] > 0) | |||||
| return (const TypefaceGlyphInfo*) glyphs [(int)lookupTable [character]]; | |||||
| const TypefaceGlyphInfo* glyph = 0; | |||||
| if (((unsigned int) character) < 128 && lookupTable [character] > 0) | |||||
| return (const TypefaceGlyphInfo*) glyphs [(int) lookupTable [character]]; | |||||
| for (int i = 0; i < glyphs.size(); ++i) | for (int i = 0; i < glyphs.size(); ++i) | ||||
| { | { | ||||
| const TypefaceGlyphInfo* const g = (TypefaceGlyphInfo*) glyphs.getUnchecked(i); | |||||
| const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) glyphs.getUnchecked(i); | |||||
| if (g->character == character) | if (g->character == character) | ||||
| { | |||||
| glyph = g; | |||||
| break; | |||||
| } | |||||
| return g; | |||||
| } | } | ||||
| if (glyph == 0) | |||||
| if (! isFullyPopulated) | |||||
| { | { | ||||
| if (! isFullyPopulated) | |||||
| { | |||||
| findAndAddSystemGlyph (character); | |||||
| for (int i = 0; i < glyphs.size(); ++i) | |||||
| { | |||||
| const TypefaceGlyphInfo* const g = (TypefaceGlyphInfo*) glyphs.getUnchecked(i); | |||||
| if (g->character == character) | |||||
| { | |||||
| glyph = g; | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| findAndAddSystemGlyph (character); | |||||
| if (glyph == 0) | |||||
| for (int i = 0; i < glyphs.size(); ++i) | |||||
| { | { | ||||
| if (CharacterFunctions::isWhitespace (character) && character != L' ') | |||||
| glyph = getGlyph (L' '); | |||||
| else if (character != defaultCharacter) | |||||
| glyph = getGlyph (defaultCharacter); | |||||
| const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) glyphs.getUnchecked(i); | |||||
| if (g->character == character) | |||||
| return g; | |||||
| } | } | ||||
| } | } | ||||
| return glyph; | |||||
| if (CharacterFunctions::isWhitespace (character) && character != L' ') | |||||
| return getGlyph (L' '); | |||||
| else if (character != defaultCharacter) | |||||
| return getGlyph (defaultCharacter); | |||||
| return 0; | |||||
| } | } | ||||
| void Typeface::addGlyph (const juce_wchar character, | void Typeface::addGlyph (const juce_wchar character, | ||||
| const Path& path, | const Path& path, | ||||
| const float horizontalSpacing) throw() | const float horizontalSpacing) throw() | ||||
| { | { | ||||
| if (character > 0 && character < 128) | |||||
| #ifdef JUCE_DEBUG | |||||
| for (int i = 0; i < glyphs.size(); ++i) | |||||
| { | |||||
| const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) glyphs.getUnchecked(i); | |||||
| if (g->character == character) | |||||
| jassertfalse; | |||||
| } | |||||
| #endif | |||||
| if (((unsigned int) character) < 128) | |||||
| lookupTable [character] = (short) glyphs.size(); | lookupTable [character] = (short) glyphs.size(); | ||||
| glyphs.add (new TypefaceGlyphInfo (character, | glyphs.add (new TypefaceGlyphInfo (character, | ||||