Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
ac7c8524ce
4 changed files with 34 additions and 45 deletions
  1. +5
    -9
      extras/audio plugin host/src/plugins/vst/juce_VSTPluginInstance.cpp
  2. +1
    -3
      extras/audio plugin host/src/plugins/vst/juce_VSTPluginInstance.h
  3. +0
    -1
      src/juce_appframework/gui/graphics/fonts/juce_Font.h
  4. +28
    -32
      src/juce_appframework/gui/graphics/fonts/juce_Typeface.cpp

+ 5
- 9
extras/audio plugin host/src/plugins/vst/juce_VSTPluginInstance.cpp View File

@@ -173,11 +173,10 @@ static Array <VSTPluginWindow*> activeWindows;
//==============================================================================
#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
static void* NewCFMFromMachO (void* const machofp) throw()
@@ -791,8 +790,6 @@ void VSTPluginInstance::prepareToPlay (double sampleRate_,
setLatencySamples (effect->initialDelay);
midiCollector.reset (sampleRate_);
juce_free (channels);
channels = (float**) juce_calloc (sizeof (float*) * jmax (16, getNumOutputChannels() + 2, getNumInputChannels() + 2));
@@ -845,7 +842,6 @@ void VSTPluginInstance::releaseResources()
setPower (false);
}
midiCollector.reset (getSampleRate());
tempBuffer.setSize (1, 1);
incomingMidi.clear();
@@ -1076,7 +1072,7 @@ public:
closePluginWindow();
activeWindows.removeValue (this);
plugin.editorBeingDeleted (this);
plugin.editorBeingDeleted (this);
}
//==============================================================================


+ 1
- 3
extras/audio plugin host/src/plugins/vst/juce_VSTPluginInstance.h View File

@@ -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,
@@ -128,7 +128,6 @@ public:
juce_UseDebuggingNewOperator
private:
friend class VSTPluginType;
friend class VSTPluginWindow;
friend class VSTPluginFormat;
@@ -137,7 +136,6 @@ private:
CriticalSection lock;
bool wantsMidiMessages, initialised, isPowerOn;
mutable StringArray programNames;
MidiMessageCollector midiCollector;
AudioSampleBuffer tempBuffer;
CriticalSection midiInLock;
MidiBuffer incomingMidi;


+ 0
- 1
src/juce_appframework/gui/graphics/fonts/juce_Font.h View File

@@ -33,7 +33,6 @@
#define __JUCE_FONT_JUCEHEADER__
#include "juce_Typeface.h"
#include "../geometry/juce_Path.h"
#include "../../../../juce_core/text/juce_StringArray.h"
#include "../../../../juce_core/containers/juce_ReferenceCountedObject.h"
#include "../../../../juce_core/containers/juce_OwnedArray.h"


+ 28
- 32
src/juce_appframework/gui/graphics/fonts/juce_Typeface.cpp View File

@@ -277,57 +277,53 @@ const Path* Typeface::getOutlineForGlyph (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)
{
const TypefaceGlyphInfo* const g = (TypefaceGlyphInfo*) glyphs.getUnchecked(i);
const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) glyphs.getUnchecked(i);
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,
const Path& path,
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();
glyphs.add (new TypefaceGlyphInfo (character,


Loading…
Cancel
Save