Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
725da5ebce
11 changed files with 80 additions and 17 deletions
  1. +1
    -1
      build/linux/platform_specific_code/juce_linux_Audio.cpp
  2. +21
    -3
      build/linux/platform_specific_code/juce_linux_Fonts.cpp
  3. +1
    -1
      build/linux/platform_specific_code/juce_linux_Windowing.cpp
  4. +5
    -5
      extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp
  5. +25
    -1
      extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj
  6. +9
    -0
      juce_Config.h
  7. +1
    -1
      src/juce_appframework/gui/components/layout/juce_TabbedComponent.cpp
  8. +1
    -1
      src/juce_appframework/gui/components/layout/juce_TabbedComponent.h
  9. +8
    -0
      src/juce_core/basics/juce_PlatformDefs.h
  10. +3
    -2
      src/juce_core/basics/juce_StandardHeader.h
  11. +5
    -2
      src/juce_core/text/juce_String.cpp

+ 1
- 1
build/linux/platform_specific_code/juce_linux_Audio.cpp View File

@@ -234,7 +234,7 @@ public:
if (failed (snd_pcm_sw_params_current (handle, swParams)) if (failed (snd_pcm_sw_params_current (handle, swParams))
|| failed (snd_pcm_sw_params_set_silence_threshold (handle, swParams, 0)) || failed (snd_pcm_sw_params_set_silence_threshold (handle, swParams, 0))
|| failed (snd_pcm_sw_params_set_silence_size (handle, swParams, INT_MAX))
|| failed (snd_pcm_sw_params_set_silence_size (handle, swParams, 0))
|| failed (snd_pcm_sw_params_set_start_threshold (handle, swParams, samplesPerPeriod)) || failed (snd_pcm_sw_params_set_start_threshold (handle, swParams, samplesPerPeriod))
|| failed (snd_pcm_sw_params_set_stop_threshold (handle, swParams, INT_MAX)) || failed (snd_pcm_sw_params_set_stop_threshold (handle, swParams, INT_MAX))
|| failed (snd_pcm_sw_params (handle, swParams))) || failed (snd_pcm_sw_params (handle, swParams)))


+ 21
- 3
build/linux/platform_specific_code/juce_linux_Fonts.cpp View File

@@ -365,11 +365,29 @@ public:
if (p == startPoint) if (p == startPoint)
{ {
destShape.startNewSubPath (x, y);
if (FT_CURVE_TAG (tags[p]) == FT_Curve_Tag_Conic)
{
float x2 = CONVERTX (points [endPoint]);
float y2 = CONVERTY (points [endPoint]);
if (FT_CURVE_TAG (tags[endPoint]) != FT_Curve_Tag_On)
{
x2 = (x + x2) * 0.5f;
y2 = (y + y2) * 0.5f;
}
destShape.startNewSubPath (x2, y2);
}
else
{
destShape.startNewSubPath (x, y);
}
} }
else if (FT_CURVE_TAG (tags[p]) == FT_Curve_Tag_On)
if (FT_CURVE_TAG (tags[p]) == FT_Curve_Tag_On)
{ {
destShape.lineTo (x, y);
if (p != startPoint)
destShape.lineTo (x, y);
} }
else if (FT_CURVE_TAG (tags[p]) == FT_Curve_Tag_Conic) else if (FT_CURVE_TAG (tags[p]) == FT_Curve_Tag_Conic)
{ {


+ 1
- 1
build/linux/platform_specific_code/juce_linux_Windowing.cpp View File

@@ -524,7 +524,7 @@ public:
if (format_ == ARGB && clearImage) if (format_ == ARGB && clearImage)
zeromem (imageData, h * lineStride); zeromem (imageData, h * lineStride);
xImage = new XImage();
xImage = (XImage*) juce_calloc (sizeof (XImage));
xImage->width = w; xImage->width = w;
xImage->height = h; xImage->height = h;


+ 5
- 5
extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp View File

@@ -129,7 +129,7 @@
class JuceVSTWrapper; class JuceVSTWrapper;
static bool recursionCheck = false; static bool recursionCheck = false;
static uint32 lastMasterIdleCall = 0;
static juce::uint32 lastMasterIdleCall = 0;
BEGIN_JUCE_NAMESPACE BEGIN_JUCE_NAMESPACE
extern void juce_callAnyTimersSynchronously(); extern void juce_callAnyTimersSynchronously();
@@ -564,7 +564,7 @@ public:
{ {
const VstMidiEvent* const vme = (const VstMidiEvent*) e; const VstMidiEvent* const vme = (const VstMidiEvent*) e;
midiEvents.addEvent ((const uint8*) vme->midiData,
midiEvents.addEvent ((const juce::uint8*) vme->midiData,
4, 4,
vme->deltaFrames); vme->deltaFrames);
} }
@@ -692,7 +692,7 @@ public:
ensureOutgoingEventSize (numEvents); ensureOutgoingEventSize (numEvents);
outgoingEvents->numEvents = 0; outgoingEvents->numEvents = 0;
const uint8* midiEventData;
const juce::uint8* midiEventData;
int midiEventSize, midiEventPosition; int midiEventSize, midiEventPosition;
MidiBuffer::Iterator i (midiEvents); MidiBuffer::Iterator i (midiEvents);
@@ -1072,7 +1072,7 @@ public:
if (Component::isMouseButtonDownAnywhere() if (Component::isMouseButtonDownAnywhere()
&& ! recursionCheck) && ! recursionCheck)
{ {
const uint32 now = JUCE_NAMESPACE::Time::getMillisecondCounter();
const juce::uint32 now = JUCE_NAMESPACE::Time::getMillisecondCounter();
if (now > lastMasterIdleCall + 20 && editorComp != 0) if (now > lastMasterIdleCall + 20 && editorComp != 0)
{ {
@@ -1379,7 +1379,7 @@ public:
private: private:
AudioProcessor* filter; AudioProcessor* filter;
juce::MemoryBlock chunkMemory; juce::MemoryBlock chunkMemory;
uint32 chunkMemoryTime;
juce::uint32 chunkMemoryTime;
EditorCompWrapper* editorComp; EditorCompWrapper* editorComp;
ERect editorSize; ERect editorSize;
MidiBuffer midiEvents; MidiBuffer midiEvents;


+ 25
- 1
extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj View File

@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
84078F3E09E6B42E004E7BCD /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84078F3D09E6B42E004E7BCD /* AGL.framework */; }; 84078F3E09E6B42E004E7BCD /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84078F3D09E6B42E004E7BCD /* AGL.framework */; };
8407902B09E6B5BD004E7BCD /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8407902A09E6B5BD004E7BCD /* QuickTime.framework */; }; 8407902B09E6B5BD004E7BCD /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8407902A09E6B5BD004E7BCD /* QuickTime.framework */; };
841083D50DB36EA400AB8583 /* MainComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841083D30DB36EA400AB8583 /* MainComponent.cpp */; };
841084880DB374E700AB8583 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 841084870DB374E700AB8583 /* juce.xcconfig */; };
841136A00D0480DE0054B790 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8411369F0D0480DE0054B790 /* OpenGL.framework */; }; 841136A00D0480DE0054B790 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8411369F0D0480DE0054B790 /* OpenGL.framework */; };
84F30CD108FEAAA20087E26C /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F30CD008FEAAA20087E26C /* Main.cpp */; }; 84F30CD108FEAAA20087E26C /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F30CD008FEAAA20087E26C /* Main.cpp */; };
84F30CED08FEAD7A0087E26C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */; }; 84F30CED08FEAD7A0087E26C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */; };
@@ -35,13 +37,17 @@
4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; 4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
84078F3D09E6B42E004E7BCD /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; }; 84078F3D09E6B42E004E7BCD /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
8407902A09E6B5BD004E7BCD /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; 8407902A09E6B5BD004E7BCD /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
841083D20DB36EA400AB8583 /* includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = includes.h; path = ../common/includes.h; sourceTree = SOURCE_ROOT; };
841083D30DB36EA400AB8583 /* MainComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../common/MainComponent.cpp; sourceTree = SOURCE_ROOT; };
841083D40DB36EA400AB8583 /* MainComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../common/MainComponent.h; sourceTree = SOURCE_ROOT; };
841084870DB374E700AB8583 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
8411369F0D0480DE0054B790 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; 8411369F0D0480DE0054B790 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
84F30CCA08FEAA8C0087E26C /* Juce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Juce.xcodeproj; path = ../../../build/macosx/Juce.xcodeproj; sourceTree = SOURCE_ROOT; }; 84F30CCA08FEAA8C0087E26C /* Juce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Juce.xcodeproj; path = ../../../build/macosx/Juce.xcodeproj; sourceTree = SOURCE_ROOT; };
84F30CD008FEAAA20087E26C /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../common/Main.cpp; sourceTree = SOURCE_ROOT; }; 84F30CD008FEAAA20087E26C /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../common/Main.cpp; sourceTree = SOURCE_ROOT; };
84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; 84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
84FAD6190C7C3CCB00AF3028 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; 84FAD6190C7C3CCB00AF3028 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; 8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D0C4E970486CD37000505A6 /* juce_application.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = juce_application.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D0C4E970486CD37000505A6 /* juce_application.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = juce_application.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */


/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@@ -75,6 +81,7 @@
children = ( children = (
20286C2AFDCF999611CA2CEA /* Sources */, 20286C2AFDCF999611CA2CEA /* Sources */,
20286C2CFDCF999611CA2CEA /* Resources */, 20286C2CFDCF999611CA2CEA /* Resources */,
841084830DB3749300AB8583 /* Build settings */,
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
195DF8CFFE9D517E11CA2CBB /* Products */, 195DF8CFFE9D517E11CA2CBB /* Products */,
); );
@@ -84,6 +91,9 @@
20286C2AFDCF999611CA2CEA /* Sources */ = { 20286C2AFDCF999611CA2CEA /* Sources */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
841083D20DB36EA400AB8583 /* includes.h */,
841083D30DB36EA400AB8583 /* MainComponent.cpp */,
841083D40DB36EA400AB8583 /* MainComponent.h */,
84F30CD008FEAAA20087E26C /* Main.cpp */, 84F30CD008FEAAA20087E26C /* Main.cpp */,
); );
name = Sources; name = Sources;
@@ -114,6 +124,14 @@
name = "External Frameworks and Libraries"; name = "External Frameworks and Libraries";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
841084830DB3749300AB8583 /* Build settings */ = {
isa = PBXGroup;
children = (
841084870DB374E700AB8583 /* juce.xcconfig */,
);
name = "Build settings";
sourceTree = "<group>";
};
84FDB05A0C15BD4500CD0087 /* Products */ = { 84FDB05A0C15BD4500CD0087 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -149,6 +167,7 @@
20286C28FDCF999611CA2CEA /* Project object */ = { 20286C28FDCF999611CA2CEA /* Project object */ = {
isa = PBXProject; isa = PBXProject;
buildConfigurationList = 84F30CC308FEAA620087E26C /* Build configuration list for PBXProject "juce_application" */; buildConfigurationList = 84F30CC308FEAA620087E26C /* Build configuration list for PBXProject "juce_application" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1; hasScannedForEncodings = 1;
mainGroup = 20286C29FDCF999611CA2CEA /* juce_application */; mainGroup = 20286C29FDCF999611CA2CEA /* juce_application */;
projectDirPath = ""; projectDirPath = "";
@@ -158,6 +177,7 @@
ProjectRef = 84F30CCA08FEAA8C0087E26C /* Juce.xcodeproj */; ProjectRef = 84F30CCA08FEAA8C0087E26C /* Juce.xcodeproj */;
}, },
); );
projectRoot = "";
targets = ( targets = (
8D0C4E890486CD37000505A6 /* juce_application */, 8D0C4E890486CD37000505A6 /* juce_application */,
); );
@@ -180,6 +200,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */, 8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */,
841084880DB374E700AB8583 /* juce.xcconfig in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -191,6 +212,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
84F30CD108FEAAA20087E26C /* Main.cpp in Sources */, 84F30CD108FEAAA20087E26C /* Main.cpp in Sources */,
841083D50DB36EA400AB8583 /* MainComponent.cpp in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -247,12 +269,14 @@
}; };
84F30CC408FEAA620087E26C /* Debug */ = { 84F30CC408FEAA620087E26C /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 841084870DB374E700AB8583 /* juce.xcconfig */;
buildSettings = { buildSettings = {
}; };
name = Debug; name = Debug;
}; };
84F30CC508FEAA620087E26C /* Release */ = { 84F30CC508FEAA620087E26C /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 841084870DB374E700AB8583 /* juce.xcconfig */;
buildSettings = { buildSettings = {
}; };
name = Release; name = Release;


+ 9
- 0
juce_Config.h View File

@@ -45,6 +45,15 @@
#define JUCE_NAMESPACE juce #define JUCE_NAMESPACE juce
#endif #endif
//=============================================================================
/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings,
but if you define this value, you can override this can force it to be true or
false.
*/
#ifndef JUCE_FORCE_DEBUG
//#define JUCE_FORCE_DEBUG 1
#endif
//============================================================================= //=============================================================================
/** If this flag is enabled, the the jassert and jassertfalse macros will /** If this flag is enabled, the the jassert and jassertfalse macros will
always use Logger::writeToLog() to write a message when an assertion happens. always use Logger::writeToLog() to write a message when an assertion happens.


+ 1
- 1
src/juce_appframework/gui/components/layout/juce_TabbedComponent.cpp View File

@@ -107,7 +107,7 @@ void TabbedComponent::setOrientation (const TabbedButtonBar::Orientation orienta
resized(); resized();
} }
const TabbedButtonBar::Orientation TabbedComponent::getOrientation() const throw()
TabbedButtonBar::Orientation TabbedComponent::getOrientation() const throw()
{ {
return tabs->getOrientation(); return tabs->getOrientation();
} }


+ 1
- 1
src/juce_appframework/gui/components/layout/juce_TabbedComponent.h View File

@@ -72,7 +72,7 @@ public:
@see setOrientation, TabbedButtonBar::getOrientation @see setOrientation, TabbedButtonBar::getOrientation
*/ */
const TabbedButtonBar::Orientation getOrientation() const throw();
TabbedButtonBar::Orientation getOrientation() const throw();
/** Specifies how many pixels wide or high the tab-bar should be. /** Specifies how many pixels wide or high the tab-bar should be.


+ 8
- 0
src/juce_core/basics/juce_PlatformDefs.h View File

@@ -139,6 +139,14 @@
#define JUCE_INTEL 1 #define JUCE_INTEL 1
#endif #endif


//==============================================================================
#ifdef JUCE_FORCE_DEBUG
#undef JUCE_DEBUG

#if JUCE_FORCE_DEBUG
#define JUCE_DEBUG 1
#endif
#endif


//============================================================================== //==============================================================================
// Compiler type macros. // Compiler type macros.


+ 3
- 2
src/juce_core/basics/juce_StandardHeader.h View File

@@ -80,6 +80,7 @@
#include <cwchar> #include <cwchar>
#include <stdexcept> #include <stdexcept>
#include <typeinfo> #include <typeinfo>
#include <cstring>
#if JUCE_MAC || JUCE_LINUX #if JUCE_MAC || JUCE_LINUX
#include <pthread.h> #include <pthread.h>
@@ -130,8 +131,8 @@
// Now include some basics that are needed by most of the Juce classes... // Now include some basics that are needed by most of the Juce classes...
BEGIN_JUCE_NAMESPACE BEGIN_JUCE_NAMESPACE
extern bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw();
extern bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw();
#if JUCE_LOG_ASSERTIONS #if JUCE_LOG_ASSERTIONS
extern void JUCE_API juce_LogAssertion (const char* filename, const int lineNum) throw(); extern void JUCE_API juce_LogAssertion (const char* filename, const int lineNum) throw();
#endif #endif


+ 5
- 2
src/juce_core/text/juce_String.cpp View File

@@ -1387,14 +1387,17 @@ const String String::replace (const tchar* const stringToReplace,
const tchar* const stringToInsert, const tchar* const stringToInsert,
const bool ignoreCase) const throw() const bool ignoreCase) const throw()
{ {
const int stringToReplaceLen = CharacterFunctions::length (stringToReplace);
const int stringToInsertLen = CharacterFunctions::length (stringToInsert);
int i = 0; int i = 0;
String result (*this); String result (*this);
while ((i = (ignoreCase ? result.indexOfIgnoreCase (i, stringToReplace) while ((i = (ignoreCase ? result.indexOfIgnoreCase (i, stringToReplace)
: result.indexOf (i, stringToReplace))) >= 0) : result.indexOf (i, stringToReplace))) >= 0)
{ {
result = result.replaceSection (i, CharacterFunctions::length (stringToReplace), stringToInsert);
i += CharacterFunctions::length (stringToInsert);
result = result.replaceSection (i, stringToReplaceLen, stringToInsert);
i += stringToInsertLen;
} }
return result; return result;


Loading…
Cancel
Save