Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
c254ac4a0c
17 changed files with 5962 additions and 5964 deletions
  1. +1
    -1
      build/linux/platform_specific_code/juce_linux_Windowing.cpp
  2. +3560
    -3560
      build/macosx/platform_specific_code/juce_mac_Windowing.cpp
  3. +2
    -2
      build/win32/platform_specific_code/juce_win32_SystemStats.cpp
  4. +1264
    -1264
      extras/audio plugin host/src/plugins/formats/juce_AudioUnitPluginFormat.cpp
  5. +3
    -3
      extras/audio plugin host/src/plugins/formats/juce_AudioUnitPluginFormat.h
  6. +3
    -3
      extras/audio plugin host/src/plugins/formats/juce_DirectXPluginFormat.h
  7. +3
    -3
      extras/audio plugin host/src/plugins/formats/juce_LADSPAPluginFormat.h
  8. +158
    -158
      extras/audio plugin host/src/plugins/juce_PluginDirectoryScanner.cpp
  9. +948
    -948
      extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp
  10. +1
    -1
      extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.cpp
  11. +13
    -13
      extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp
  12. +0
    -1
      extras/juce demo/src/BinaryData.cpp
  13. +0
    -1
      extras/the jucer/src/BinaryData.cpp
  14. +2
    -2
      src/juce_appframework/gui/components/juce_Component.cpp
  15. +1
    -1
      src/juce_appframework/gui/components/juce_Desktop.cpp
  16. +1
    -1
      src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp
  17. +2
    -2
      src/juce_core/basics/juce_MathsFunctions.h

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

@@ -940,7 +940,7 @@ public:
{
jassert (x >= 0 && y >= 0 && x < ww && y < wh); // should only be called for points that are actually inside the bounds
if (((unsigned int) x) >= (unsigned int) ww
if (((unsigned int) x) >= (unsigned int) ww
|| ((unsigned int) y) >= (unsigned int) wh)
return false;


+ 3560
- 3560
build/macosx/platform_specific_code/juce_mac_Windowing.cpp
File diff suppressed because it is too large
View File


+ 2
- 2
build/win32/platform_specific_code/juce_win32_SystemStats.cpp View File

@@ -359,10 +359,10 @@ bool SystemStats::isOperatingSystem64Bit() throw()
BOOL isWow64 = FALSE;
return (fnIsWow64Process != 0)
return (fnIsWow64Process != 0)
&& fnIsWow64Process (GetCurrentProcess(), &isWow64)
&& (isWow64 != FALSE);
#endif
#endif
}
//==============================================================================


+ 1264
- 1264
extras/audio plugin host/src/plugins/formats/juce_AudioUnitPluginFormat.cpp
File diff suppressed because it is too large
View File


+ 3
- 3
extras/audio plugin host/src/plugins/formats/juce_AudioUnitPluginFormat.h View File

@@ -29,8 +29,8 @@
==============================================================================
*/
#ifndef __JUCE_VSTPLUGINFORMAT_JUCEHEADER__x
#define __JUCE_VSTPLUGINFORMAT_JUCEHEADER__x
#ifndef __JUCE_AUDIOUNITPLUGINFORMAT_JUCEHEADER__
#define __JUCE_AUDIOUNITPLUGINFORMAT_JUCEHEADER__
#include "../juce_AudioPluginFormat.h"
@@ -60,4 +60,4 @@ public:
#endif
#endif // __JUCE_VSTPLUGINFORMAT_JUCEHEADER__
#endif // __JUCE_AUDIOUNITPLUGINFORMAT_JUCEHEADER__

+ 3
- 3
extras/audio plugin host/src/plugins/formats/juce_DirectXPluginFormat.h View File

@@ -29,8 +29,8 @@
==============================================================================
*/
#ifndef __JUCE_VSTPLUGINFORMAT_JUCEHEADER__xy
#define __JUCE_VSTPLUGINFORMAT_JUCEHEADER__xy
#ifndef __JUCE_DIRECTXPLUGINFORMAT_JUCEHEADER__
#define __JUCE_DIRECTXPLUGINFORMAT_JUCEHEADER__
#include "../juce_AudioPluginFormat.h"
@@ -64,4 +64,4 @@ public:
#endif
#endif // __JUCE_VSTPLUGINFORMAT_JUCEHEADER__
#endif // __JUCE_DIRECTXPLUGINFORMAT_JUCEHEADER__

+ 3
- 3
extras/audio plugin host/src/plugins/formats/juce_LADSPAPluginFormat.h View File

@@ -29,8 +29,8 @@
==============================================================================
*/
#ifndef __JUCE_VSTPLUGINFORMAT_JUCEHEADER__xyz
#define __JUCE_VSTPLUGINFORMAT_JUCEHEADER__xyz
#ifndef __JUCE_LADSPAPLUGINFORMAT_JUCEHEADER__
#define __JUCE_LADSPAPLUGINFORMAT_JUCEHEADER__
#include "../juce_AudioPluginFormat.h"
@@ -64,4 +64,4 @@ public:
#endif
#endif // __JUCE_VSTPLUGINFORMAT_JUCEHEADER__
#endif // __JUCE_LADSPAPLUGINFORMAT_JUCEHEADER__

+ 158
- 158
extras/audio plugin host/src/plugins/juce_PluginDirectoryScanner.cpp View File

@@ -1,158 +1,158 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "../../../../juce.h"
#include "juce_PluginDirectoryScanner.h"
#include "juce_AudioPluginFormat.h"
//==============================================================================
PluginDirectoryScanner::PluginDirectoryScanner (KnownPluginList& listToAddTo,
FileSearchPath directoriesToSearch,
const bool recursive,
const File& deadMansPedalFile_)
: list (listToAddTo),
deadMansPedalFile (deadMansPedalFile_),
nextIndex (0),
progress (0)
{
directoriesToSearch.removeRedundantPaths();
for (int j = 0; j < directoriesToSearch.getNumPaths(); ++j)
recursiveFileSearch (directoriesToSearch [j], recursive);
// If any plugins have crashed recently when being loaded, move them to the
// end of the list to give the others a chance to load correctly..
const StringArray crashedPlugins (getDeadMansPedalFile());
for (int i = 0; i < crashedPlugins.size(); ++i)
{
const File f (crashedPlugins[i]);
for (int j = filesToScan.size(); --j >= 0;)
if (f == *filesToScan.getUnchecked (j))
filesToScan.move (j, -1);
}
}
void PluginDirectoryScanner::recursiveFileSearch (const File& dir, const bool recursive)
{
// avoid allowing the dir iterator to be recursive, because we want to avoid letting it delve inside
// .component or .vst directories.
DirectoryIterator iter (dir, false, "*", File::findFilesAndDirectories);
while (iter.next())
{
const File f (iter.getFile());
bool isPlugin = false;
for (int i = 0; i < AudioPluginFormatManager::getInstance()->getNumFormats(); ++i)
{
AudioPluginFormat* const format = AudioPluginFormatManager::getInstance()->getFormat (i);
if (format->fileMightContainThisPluginType (f))
{
isPlugin = true;
filesToScan.add (new File (f));
break;
}
}
if (recursive && (! isPlugin) && f.isDirectory())
recursiveFileSearch (f, true);
}
}
PluginDirectoryScanner::~PluginDirectoryScanner()
{
}
//==============================================================================
const File PluginDirectoryScanner::getNextPluginFileThatWillBeScanned() const throw()
{
File* const file = filesToScan [nextIndex];
if (file != 0)
return *file;
return File::nonexistent;
}
bool PluginDirectoryScanner::scanNextFile (const bool dontRescanIfAlreadyInList)
{
File* const file = filesToScan [nextIndex];
if (file != 0)
{
if (! list.isListingUpToDate (*file))
{
OwnedArray <PluginDescription> typesFound;
// Add this plugin to the end of the dead-man's pedal list in case it crashes...
StringArray crashedPlugins (getDeadMansPedalFile());
crashedPlugins.removeString (file->getFullPathName());
crashedPlugins.add (file->getFullPathName());
setDeadMansPedalFile (crashedPlugins);
list.scanAndAddFile (*file,
dontRescanIfAlreadyInList,
typesFound);
// Managed to load without crashing, so remove it from the dead-man's-pedal..
crashedPlugins.removeString (file->getFullPathName());
setDeadMansPedalFile (crashedPlugins);
}
++nextIndex;
progress = nextIndex / (float) filesToScan.size();
}
return nextIndex < filesToScan.size();
}
const StringArray PluginDirectoryScanner::getDeadMansPedalFile() throw()
{
StringArray lines;
if (deadMansPedalFile != File::nonexistent)
{
lines.addLines (deadMansPedalFile.loadFileAsString());
lines.removeEmptyStrings();
}
return lines;
}
void PluginDirectoryScanner::setDeadMansPedalFile (const StringArray& newContents) throw()
{
if (deadMansPedalFile != File::nonexistent)
deadMansPedalFile.replaceWithText (newContents.joinIntoString ("\n"), true, true);
}
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "../../../../juce.h"
#include "juce_PluginDirectoryScanner.h"
#include "juce_AudioPluginFormat.h"
//==============================================================================
PluginDirectoryScanner::PluginDirectoryScanner (KnownPluginList& listToAddTo,
FileSearchPath directoriesToSearch,
const bool recursive,
const File& deadMansPedalFile_)
: list (listToAddTo),
deadMansPedalFile (deadMansPedalFile_),
nextIndex (0),
progress (0)
{
directoriesToSearch.removeRedundantPaths();
for (int j = 0; j < directoriesToSearch.getNumPaths(); ++j)
recursiveFileSearch (directoriesToSearch [j], recursive);
// If any plugins have crashed recently when being loaded, move them to the
// end of the list to give the others a chance to load correctly..
const StringArray crashedPlugins (getDeadMansPedalFile());
for (int i = 0; i < crashedPlugins.size(); ++i)
{
const File f (crashedPlugins[i]);
for (int j = filesToScan.size(); --j >= 0;)
if (f == *filesToScan.getUnchecked (j))
filesToScan.move (j, -1);
}
}
void PluginDirectoryScanner::recursiveFileSearch (const File& dir, const bool recursive)
{
// avoid allowing the dir iterator to be recursive, because we want to avoid letting it delve inside
// .component or .vst directories.
DirectoryIterator iter (dir, false, "*", File::findFilesAndDirectories);
while (iter.next())
{
const File f (iter.getFile());
bool isPlugin = false;
for (int i = 0; i < AudioPluginFormatManager::getInstance()->getNumFormats(); ++i)
{
AudioPluginFormat* const format = AudioPluginFormatManager::getInstance()->getFormat (i);
if (format->fileMightContainThisPluginType (f))
{
isPlugin = true;
filesToScan.add (new File (f));
break;
}
}
if (recursive && (! isPlugin) && f.isDirectory())
recursiveFileSearch (f, true);
}
}
PluginDirectoryScanner::~PluginDirectoryScanner()
{
}
//==============================================================================
const File PluginDirectoryScanner::getNextPluginFileThatWillBeScanned() const throw()
{
File* const file = filesToScan [nextIndex];
if (file != 0)
return *file;
return File::nonexistent;
}
bool PluginDirectoryScanner::scanNextFile (const bool dontRescanIfAlreadyInList)
{
File* const file = filesToScan [nextIndex];
if (file != 0)
{
if (! list.isListingUpToDate (*file))
{
OwnedArray <PluginDescription> typesFound;
// Add this plugin to the end of the dead-man's pedal list in case it crashes...
StringArray crashedPlugins (getDeadMansPedalFile());
crashedPlugins.removeString (file->getFullPathName());
crashedPlugins.add (file->getFullPathName());
setDeadMansPedalFile (crashedPlugins);
list.scanAndAddFile (*file,
dontRescanIfAlreadyInList,
typesFound);
// Managed to load without crashing, so remove it from the dead-man's-pedal..
crashedPlugins.removeString (file->getFullPathName());
setDeadMansPedalFile (crashedPlugins);
}
++nextIndex;
progress = nextIndex / (float) filesToScan.size();
}
return nextIndex < filesToScan.size();
}
const StringArray PluginDirectoryScanner::getDeadMansPedalFile() throw()
{
StringArray lines;
if (deadMansPedalFile != File::nonexistent)
{
lines.addLines (deadMansPedalFile.loadFileAsString());
lines.removeEmptyStrings();
}
return lines;
}
void PluginDirectoryScanner::setDeadMansPedalFile (const StringArray& newContents) throw()
{
if (deadMansPedalFile != File::nonexistent)
deadMansPedalFile.replaceWithText (newContents.joinIntoString ("\n"), true, true);
}

+ 948
- 948
extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp
File diff suppressed because it is too large
View File


+ 1
- 1
extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.cpp View File

@@ -69,7 +69,7 @@ void JUCE_CALLTYPE attachSubWindow (void* hostWindow,
SetWindowLong (plugWnd, GWL_STYLE, val);
val = GetWindowLong ((HWND) hostWindow, GWL_STYLE);
SetWindowLong ((HWND) hostWindow, GWL_STYLE, val | WS_CLIPCHILDREN);
SetWindowLong ((HWND) hostWindow, GWL_STYLE, val | WS_CLIPCHILDREN);
}
void JUCE_CALLTYPE resizeHostWindow (void* hostWindow,


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

@@ -99,18 +99,18 @@
enum VstSmpteFrameRate
{
kVstSmpte24fps = 0, ///< 24 fps
kVstSmpte25fps = 1, ///< 25 fps
kVstSmpte2997fps = 2, ///< 29.97 fps
kVstSmpte30fps = 3, ///< 30 fps
kVstSmpte2997dfps = 4, ///< 29.97 drop
kVstSmpte30dfps = 5, ///< 30 drop
kVstSmpteFilm16mm = 6, ///< Film 16mm
kVstSmpteFilm35mm = 7, ///< Film 35mm
kVstSmpte239fps = 10, ///< HDTV: 23.976 fps
kVstSmpte249fps = 11, ///< HDTV: 24.976 fps
kVstSmpte599fps = 12, ///< HDTV: 59.94 fps
kVstSmpte60fps = 13 ///< HDTV: 60 fps
kVstSmpte24fps = 0, ///< 24 fps
kVstSmpte25fps = 1, ///< 25 fps
kVstSmpte2997fps = 2, ///< 29.97 fps
kVstSmpte30fps = 3, ///< 30 fps
kVstSmpte2997dfps = 4, ///< 29.97 drop
kVstSmpte30dfps = 5, ///< 30 drop
kVstSmpteFilm16mm = 6, ///< Film 16mm
kVstSmpteFilm35mm = 7, ///< Film 35mm
kVstSmpte239fps = 10, ///< HDTV: 23.976 fps
kVstSmpte249fps = 11, ///< HDTV: 24.976 fps
kVstSmpte599fps = 12, ///< HDTV: 59.94 fps
kVstSmpte60fps = 13 ///< HDTV: 60 fps
};
#endif
@@ -976,7 +976,7 @@ public:
return filter != 0 && filter->isParameterAutomatable ((int) index);
}
bool setSpeakerArrangement (VstSpeakerArrangement* /*pluginInput*/,
bool setSpeakerArrangement (VstSpeakerArrangement* /*pluginInput*/,
VstSpeakerArrangement* /*pluginOutput*/)
{
// if this method isn't implemented, nuendo4 + cubase4 crash when you've got multiple channels..


+ 0
- 1
extras/juce demo/src/BinaryData.cpp View File

@@ -7961,4 +7961,3 @@ static const unsigned char temp17[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61
110,100,77,97,110,97,103,101,114,42,32,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,
110,32,110,101,119,32,87,105,100,103,101,116,115,68,101,109,111,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,59,13,10,125,13,10,0,0};
const char* BinaryData::widgetsdemo_cpp = (const char*) temp17;

+ 0
- 1
extras/the jucer/src/BinaryData.cpp View File

@@ -911,4 +911,3 @@ static const unsigned char temp4[] = {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68
0,98,28,9,155,95,0,2,104,68,236,11,1,8,160,17,225,73,128,0,3,0,120,52,172,151,198,78,252,63,0,0,0,0,73,69,78,68,174,66,
96,130,0,0};
const char* BinaryData::prefs_misc_png = (const char*) temp4;

+ 2
- 2
src/juce_appframework/gui/components/juce_Component.cpp View File

@@ -1103,7 +1103,7 @@ void Component::getInterceptsMouseClicks (bool& allowsClicksOnThisComponent,
bool Component::contains (const int x, const int y)
{
if (((unsigned int) x) < (unsigned int) getWidth()
if (((unsigned int) x) < (unsigned int) getWidth()
&& ((unsigned int) y) < (unsigned int) getHeight()
&& hitTest (x, y))
{
@@ -1147,7 +1147,7 @@ bool Component::reallyContains (int x, int y, const bool returnTrueIfWithinAChil
Component* Component::getComponentAt (const int x, const int y)
{
if (flags.visibleFlag
&& ((unsigned int) x) < (unsigned int) getWidth()
&& ((unsigned int) x) < (unsigned int) getWidth()
&& ((unsigned int) y) < (unsigned int) getHeight()
&& hitTest (x, y))
{


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

@@ -87,7 +87,7 @@ void Desktop::refreshMonitorSizes() throw()
jassert (monitorCoordsClipped.size() > 0
&& monitorCoordsClipped.size() == monitorCoordsUnclipped.size());
if (oldClipped != monitorCoordsClipped
if (oldClipped != monitorCoordsClipped
|| oldUnclipped != monitorCoordsUnclipped)
{
for (int i = ComponentPeer::getNumPeers(); --i >= 0;)


+ 1
- 1
src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp View File

@@ -59,7 +59,7 @@ struct JPEGDecodingFailure {};
static void fatalErrorHandler (j_common_ptr)
{
throw JPEGDecodingFailure();
}
}
static void silentErrorCallback1 (j_common_ptr) {}
static void silentErrorCallback2 (j_common_ptr, int) {}


+ 2
- 2
src/juce_core/basics/juce_MathsFunctions.h View File

@@ -162,8 +162,8 @@ inline double jmin (const double a, const double b, const double c, const double
//==============================================================================
/** Constrains a value to keep it within a given range.
This will check that the specified value lies between the lower and upper bounds
specified, and if not, will return the nearest value that would be in-range. Effectively,
This will check that the specified value lies between the lower and upper bounds
specified, and if not, will return the nearest value that would be in-range. Effectively,
it's like calling jmax (lowerLimit, jmin (upperLimit, value)).
Note that it expects that lowerLimit <= upperLimit. If this isn't true,


Loading…
Cancel
Save