1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00

Fix for audio plugin builds on win32. AudioProcessorGraph optimisations. Access to min/max values in audio thumbnails. More metadata support for wav and aiff formats.

This commit is contained in:
Julian Storer 2011-04-13 11:28:35 +01:00
parent 345c7aa23c
commit d97ce5f9ee
20 changed files with 2256 additions and 926 deletions

View file

@ -38,6 +38,22 @@ BEGIN_JUCE_NAMESPACE
extern void juce_initialiseMacMainMenu();
#endif
//==============================================================================
class AppBroadcastCallback : public ActionListener
{
public:
AppBroadcastCallback() { MessageManager::getInstance()->registerBroadcastListener (this); }
~AppBroadcastCallback() { MessageManager::getInstance()->deregisterBroadcastListener (this); }
void actionListenerCallback (const String& message)
{
JUCEApplication* const app = JUCEApplication::getInstance();
if (app != 0 && message.startsWith (app->getApplicationName() + "/"))
app->anotherInstanceStarted (message.substring (app->getApplicationName().length() + 1));
}
};
//==============================================================================
JUCEApplication::JUCEApplication()
: appReturnValue (0),
@ -87,12 +103,6 @@ void JUCEApplication::setApplicationReturnValue (const int newReturnValue) noexc
appReturnValue = newReturnValue;
}
void JUCEApplication::actionListenerCallback (const String& message)
{
if (message.startsWith (getApplicationName() + "/"))
anotherInstanceStarted (message.substring (getApplicationName().length() + 1));
}
//==============================================================================
void JUCEApplication::unhandledException (const std::exception*,
const String&,
@ -149,7 +159,7 @@ bool JUCEApplication::initialiseApp (const String& commandLine)
{
commandLineParameters = commandLine.trim();
#if ! JUCE_IOS
#if ! JUCE_IOS
jassert (appLock == nullptr); // initialiseApp must only be called once!
if (! moreThanOneInstanceAllowed())
@ -165,17 +175,18 @@ bool JUCEApplication::initialiseApp (const String& commandLine)
return false;
}
}
#endif
#endif
// let the app do its setting-up..
initialise (commandLineParameters);
#if JUCE_MAC
#if JUCE_MAC
juce_initialiseMacMainMenu(); // needs to be called after the app object has created, to get its name
#endif
#endif
// register for broadcast new app messages
MessageManager::getInstance()->registerBroadcastListener (this);
#if ! JUCE_IOS
broadcastCallback = new AppBroadcastCallback();
#endif
stillInitialising = false;
return true;
@ -185,7 +196,7 @@ int JUCEApplication::shutdownApp()
{
jassert (appInstance == this);
MessageManager::getInstance()->deregisterBroadcastListener (this);
broadcastCallback = nullptr;
JUCE_TRY
{
@ -249,20 +260,20 @@ int JUCEApplication::main (int argc, const char* argv[])
{
JUCE_AUTORELEASEPOOL
#if ! JUCE_WINDOWS
#if ! JUCE_WINDOWS
jassert (createInstance != nullptr);
juce_Argv0 = argv[0];
#endif
#endif
#if JUCE_IOS
#if JUCE_IOS
return juce_iOSMain (argc, argv);
#else
#else
String cmd;
for (int i = 1; i < argc; ++i)
cmd << argv[i] << ' ';
return JUCEApplication::main (cmd);
#endif
#endif
}
#endif