From d31e44b5ab5440dbc7e2cdb7cf3417d585b6127b Mon Sep 17 00:00:00 2001 From: Lukasz Kozakiewicz Date: Fri, 27 Oct 2017 16:25:25 +0200 Subject: [PATCH 01/16] PushNotifications: compile out any PN code on iOS if PNs are not enabled. --- modules/juce_gui_basics/native/juce_ios_Windowing.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/juce_gui_basics/native/juce_ios_Windowing.mm b/modules/juce_gui_basics/native/juce_ios_Windowing.mm index cfad99a2f2..3b8fe6ed9e 100644 --- a/modules/juce_gui_basics/native/juce_ios_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_ios_Windowing.mm @@ -57,6 +57,7 @@ namespace juce - (void) applicationWillResignActive: (UIApplication*) application; - (void) application: (UIApplication*) application handleEventsForBackgroundURLSession: (NSString*) identifier completionHandler: (void (^)(void)) completionHandler; +#if JUCE_PUSH_NOTIFICATIONS - (void) application: (UIApplication*) application didRegisterUserNotificationSettings: (UIUserNotificationSettings*) notificationSettings; - (void) application: (UIApplication*) application didRegisterForRemoteNotificationsWithDeviceToken: (NSData*) deviceToken; - (void) application: (UIApplication*) application didFailToRegisterForRemoteNotificationsWithError: (NSError*) error; @@ -72,12 +73,13 @@ namespace juce - (void) application: (UIApplication*) application handleActionWithIdentifier: (NSString*) identifier forLocalNotification: (UILocalNotification*) notification withResponseInfo: (NSDictionary*) responseInfo completionHandler: (void(^)()) completionHandler; -#if JUCE_PUSH_NOTIFICATIONS && defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 +#if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 - (void) userNotificationCenter: (UNUserNotificationCenter*) center willPresentNotification: (UNNotification*) notification withCompletionHandler: (void (^)(UNNotificationPresentationOptions options)) completionHandler; - (void) userNotificationCenter: (UNUserNotificationCenter*) center didReceiveNotificationResponse: (UNNotificationResponse*) response withCompletionHandler: (void(^)())completionHandler; #endif +#endif @end @@ -177,6 +179,7 @@ namespace juce _pushNotificationsDelegate = delegate; } +#if JUCE_PUSH_NOTIFICATIONS - (void) application: (UIApplication*) application didRegisterUserNotificationSettings: (UIUserNotificationSettings*) notificationSettings { ignoreUnused (application); @@ -354,7 +357,7 @@ namespace juce } } -#if JUCE_PUSH_NOTIFICATIONS && defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 +#if defined (__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 - (void) userNotificationCenter: (UNUserNotificationCenter*) center willPresentNotification: (UNNotification*) notification withCompletionHandler: (void (^)(UNNotificationPresentationOptions options)) completionHandler { @@ -395,6 +398,7 @@ namespace juce } } #endif +#endif @end From d654e442aa3a003428eafbb66ce7b63d69f29702 Mon Sep 17 00:00:00 2001 From: tpoole Date: Fri, 27 Oct 2017 10:18:51 +0100 Subject: [PATCH 02/16] Fixed an IAA namespacing issue --- .../Standalone/juce_StandaloneFilterApp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp index 866c02afeb..8fcf75cee3 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterApp.cpp @@ -129,8 +129,12 @@ protected: ScopedPointer mainWindow; }; +} // namespace juce + #if JucePlugin_Build_Standalone && JUCE_IOS +using namespace juce; + bool JUCE_CALLTYPE juce_isInterAppAudioConnected() { if (auto holder = StandalonePluginHolder::getInstance()) @@ -156,6 +160,4 @@ Image JUCE_CALLTYPE juce_getIAAHostIcon (int size) #endif #endif -} // namespace juce - #endif From ca5620710c7cff22200e927d2d63bade7114fa4f Mon Sep 17 00:00:00 2001 From: tpoole Date: Thu, 26 Oct 2017 16:36:32 +0100 Subject: [PATCH 03/16] Some minor documentation improvements --- modules/juce_core/files/juce_File.h | 3 +++ modules/juce_graphics/colour/juce_Colours.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index d10edfe8bc..36530926a9 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -275,6 +275,9 @@ public: /** Returns the directory that contains this file or directory. e.g. for "/moose/fish/foo.txt" this will return "/moose/fish". + + If you are already at the root directory ("/" or "C:") then this method will + return the root directory. */ File getParentDirectory() const; diff --git a/modules/juce_graphics/colour/juce_Colours.h b/modules/juce_graphics/colour/juce_Colours.h index cef12a3e68..c79911740a 100644 --- a/modules/juce_graphics/colour/juce_Colours.h +++ b/modules/juce_graphics/colour/juce_Colours.h @@ -31,7 +31,7 @@ namespace juce /** Contains a set of predefined named colours (mostly standard HTML colours) - @see Colour, Colours::greyLevel + @see Colour */ class Colours { From b20141e90ea5a54ae0ea1ddf11c367ef56183912 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 26 Oct 2017 17:42:41 +0100 Subject: [PATCH 04/16] Fixed some documentation in JUCE Atomic class --- modules/juce_core/memory/juce_Atomic.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/juce_core/memory/juce_Atomic.h b/modules/juce_core/memory/juce_Atomic.h index c74e9f4002..78bb4ef99a 100644 --- a/modules/juce_core/memory/juce_Atomic.h +++ b/modules/juce_core/memory/juce_Atomic.h @@ -135,7 +135,9 @@ namespace juce //============================================================================== #ifndef DOXYGEN - // This method has been deprecated as there is no equivalent method in std::atomic. + /* This method has been deprecated as there is no equivalent method in + std::atomic. Use compareAndSetBool instead. + */ JUCE_DEPRECATED (Type compareAndSetValue (Type, Type) noexcept); #endif }; From 1759d89e18badbb2ad316722e6ba24d888f55980 Mon Sep 17 00:00:00 2001 From: tpoole Date: Wed, 1 Nov 2017 10:25:55 +0000 Subject: [PATCH 05/16] A minor documentation update --- .../misc/juce_PushNotifications.h | 56 +++++++++++-------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/modules/juce_gui_extra/misc/juce_PushNotifications.h b/modules/juce_gui_extra/misc/juce_PushNotifications.h index e5b2b6c577..94ee5ccffc 100644 --- a/modules/juce_gui_extra/misc/juce_PushNotifications.h +++ b/modules/juce_gui_extra/misc/juce_PushNotifications.h @@ -35,10 +35,11 @@ namespace juce listener as soon as possible, because your application can be launched from a push notification too. - To send a local notification create an instance of @class Notification, fill the - necessary fields and call PushNotifications::sendLocalNotification(). When receiving - local or remote notifications, inspect the Notification's fields for notification details. - Bear in mind that some fields will not be available when receiving a remote notification. + To send a local notification create an instance of Notification, fill the necessary + fields and call PushNotifications::sendLocalNotification(). When receiving local or + remote notifications, inspect the Notification's fields for notification details. + Bear in mind that some fields will not be available when receiving a remote + notification. */ class JUCE_API PushNotifications { @@ -403,7 +404,7 @@ public: You can also call requestSettingsUsed() to explicitly ask for current settings. */ - void requestPermissionsWithSettings (const Settings& s); + void requestPermissionsWithSettings (const Settings& settings); /** Sends an asynchronous request to retrieve current settings that are currently in use. These can be exactly the same as used in requestPermissionsWithSettings(), but depending @@ -467,7 +468,7 @@ public: used in the app. These have to be setup before notifications can be sent on Android API level 26 or higher. */ - void setupChannels (const Array&, const Array&); + void setupChannels (const Array& groups, const Array& channels); //========================================================================== /** iOS only: sends an asynchronous request to retrieve a list of notifications that were @@ -494,7 +495,7 @@ public: if the same identifier is used as in a notification that was already sent and not yet responded by a user. */ - void sendLocalNotification (const Notification& n); + void sendLocalNotification (const Notification& notification); /** Sends a request for a list of notifications delivered. Such notifications are visible in the notification area on the device and they are still waiting for user action/response. @@ -577,15 +578,15 @@ public: requestPermissionsWithSettings(). Note that settings are currently only used on iOS. When called on other platforms, Settings - with no categories and all allow* flags set to true will be received in + with no categories and all allow flags set to true will be received in Listener::notificationSettingsReceived(). */ - virtual void notificationSettingsReceived (const Settings&) {} + virtual void notificationSettingsReceived (const Settings& settings) { ignoreUnused (settings); } /** Called when the list of pending notifications, requested by calling getPendingLocalNotifications() is returned. iOS 10 or above only. */ - virtual void pendingLocalNotificationsListReceived (const Array&) {} + virtual void pendingLocalNotificationsListReceived (const Array& notifications) { ignoreUnused (notifications); } /** This can be called in multiple different situations, depending on the OS and the situation. @@ -601,7 +602,7 @@ public: Note you can receive this callback on startup, if the application was launched from a notification. */ - virtual void handleNotification (bool /*isLocalNotification*/, const Notification& /*n*/) {} + virtual void handleNotification (bool isLocalNotification, const Notification& notification) { ignoreUnused (isLocalNotification); ignoreUnused (notification); } /** This can be called when a user performs some action on the notification such as pressing on an action button or responding with a text input. @@ -610,19 +611,28 @@ public: Note you can receive this callback on startup, if the application was launched from a notification's action. - @param optionalResponse Text response a user inputs for notifications with a text input. - Empty for notifications without a text input option. + @param isLocalNotification If the notification is local + @param notification The notification + @param actionIdentifier A String identifiing the action + @param optionalResponse Text response a user inputs for notifications with a text input. + Empty for notifications without a text input option. */ - virtual void handleNotificationAction (bool /*isLocalNotification*/, - const Notification& /*n*/, - const String& /*actionIdentifier*/, - const String& /*optionalResponse*/) {} + virtual void handleNotificationAction (bool isLocalNotification, + const Notification& notification, + const String& actionIdentifier, + const String& optionalResponse) + { + ignoreUnused (isLocalNotification); + ignoreUnused (notification); + ignoreUnused (actionIdentifier); + ignoreUnused (optionalResponse); + } /** For iOS10 and Android, this can be also called when a user dismissed the notification before responding to it. */ - virtual void localNotificationDismissedByUser (const Notification& /*n*/) {} + virtual void localNotificationDismissedByUser (const Notification& notification) { ignoreUnused (notification); } /** Called after getDeliveredNotifications() request is fulfilled. Returns notifications that are visible in the notification area on the device and that are still waiting @@ -631,12 +641,12 @@ public: On iOS, iOS version 10 or higher is required. On Android, API level 18 or higher is required. For unsupported platforms, an empty array will be returned. */ - virtual void deliveredNotificationsListReceived (const Array&) {} + virtual void deliveredNotificationsListReceived (const Array& notifications) { ignoreUnused (notifications); } /** Called whenever a token gets refreshed. You should monitor any token updates, because only the last token that is assigned to device is valid and can be used. */ - virtual void deviceTokenRefreshed (const String& /*token*/) {} + virtual void deviceTokenRefreshed (const String& token) { ignoreUnused (token); } /** Called when Firebase Cloud Messaging server deletes pending messages. This can happen when 1) too many messages were sent to the server (hint: use collapsible messages). @@ -649,13 +659,13 @@ public: sent successfully. Bear in mind that in may take several minutes or more to receive this callback. */ - virtual void upstreamMessageSent (const String& /*messageId*/) {} + virtual void upstreamMessageSent (const String& messageId) { ignoreUnused (messageId); } /** Called when there was an error sending an upstream message with PushNotifications::sendUpstreamMessage(). Bear in mind that in may take several minutes or more to receive this callback. */ - virtual void upstreamMessageSendingError (const String& /*messageId*/, const String& /*error*/) {} + virtual void upstreamMessageSendingError (const String& messageId, const String& error) { ignoreUnused (messageId); ignoreUnused (error); } }; void addListener (Listener* l); @@ -668,7 +678,7 @@ private: ListenerList listeners; #if JUCE_ANDROID - friend bool juce_handleNotificationIntent (void* intent); + friend bool juce_handleNotificationIntent (void*); friend void juce_firebaseDeviceNotificationsTokenRefreshed (void*); friend void juce_firebaseRemoteNotificationReceived (void*); friend void juce_firebaseRemoteMessagesDeleted(); From 5bc0c2b06fe1d790ebae552b3056b8c2f224340d Mon Sep 17 00:00:00 2001 From: hogliux Date: Tue, 21 Nov 2017 12:39:04 +0000 Subject: [PATCH 06/16] VST3: Added support for VST3 SDK 3.6.8 --- .../VST3/juce_VST3_Wrapper.cpp | 10 +++++++++- .../format_types/juce_VST3Common.h | 9 +++++++-- .../format_types/juce_VST3Headers.h | 10 ++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 88e873b744..680bb50f2e 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -2597,7 +2597,15 @@ struct JucePluginFactory : public IPluginFactory3 { *obj = nullptr; - FUID sourceFuid = sourceIid; + TUID tuid; + memcpy (tuid, sourceIid, sizeof (TUID)); + + #if VST_VERSION >= 0x030608 + auto sourceFuid = FUID::fromTUID (tuid); + #else + FUID sourceFuid; + sourceFuid = tuid; + #endif if (cid == nullptr || sourceIid == nullptr || ! sourceFuid.isValid()) { diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 7ac3608aef..3eca4f0285 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -61,6 +61,11 @@ static bool doUIDsMatch (const Steinberg::TUID a, const Steinberg::TUID b) noexc return Steinberg::kResultOk; \ } +//============================================================================== +#if VST_VERSION < 0x030608 + #define kAmbi1stOrderACN kBFormat +#endif + //============================================================================== inline juce::String toString (const Steinberg::char8* string) noexcept { return juce::String (string); } inline juce::String toString (const Steinberg::char16* string) noexcept { return juce::String (juce::CharPointer_UTF16 ((juce::CharPointer_UTF16::CharType*) string)); } @@ -265,7 +270,7 @@ static inline Steinberg::Vst::SpeakerArrangement getVst3SpeakerArrangement (cons else if (channels == AudioChannelSet::create7point0SDDS()) return k70Cine; else if (channels == AudioChannelSet::create7point1()) return k71CineSideFill; else if (channels == AudioChannelSet::create7point1SDDS()) return k71Cine; - else if (channels == AudioChannelSet::ambisonic()) return kBFormat; + else if (channels == AudioChannelSet::ambisonic()) return kAmbi1stOrderACN; else if (channels == AudioChannelSet::quadraphonic()) return k40Music; else if (channels == AudioChannelSet::create7point0point2()) return k71_2 & ~(Steinberg::Vst::kSpeakerLfe); else if (channels == AudioChannelSet::create7point1point2()) return k71_2; @@ -300,7 +305,7 @@ static inline AudioChannelSet getChannelSetForSpeakerArrangement (Steinberg::Vst else if (arr == k70Cine) return AudioChannelSet::create7point0SDDS(); else if (arr == k71CineSideFill) return AudioChannelSet::create7point1(); else if (arr == k71Cine) return AudioChannelSet::create7point1SDDS(); - else if (arr == kBFormat) return AudioChannelSet::ambisonic(); + else if (arr == kAmbi1stOrderACN) return AudioChannelSet::ambisonic(); else if (arr == k40Music) return AudioChannelSet::quadraphonic(); else if (arr == k71_2) return AudioChannelSet::create7point1point2(); else if (arr == (k71_2 & ~(Steinberg::Vst::kSpeakerLfe))) return AudioChannelSet::create7point0point2(); diff --git a/modules/juce_audio_processors/format_types/juce_VST3Headers.h b/modules/juce_audio_processors/format_types/juce_VST3Headers.h index 0b2fb02048..f289851507 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Headers.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Headers.h @@ -89,13 +89,21 @@ #include #include #else + // needed for VST_VSERION + #include + #include #include #include #include #include #include +#if VST_VERSION >= 0x030608 + #include + #include +#else #include +#endif #include #include #include @@ -122,7 +130,9 @@ namespace Steinberg DEF_CLASS_IID (IPluginBase) DEF_CLASS_IID (IPlugView) DEF_CLASS_IID (IPlugFrame) + #if VST_VERSION < 0x030608 DEF_CLASS_IID (IBStream) + #endif DEF_CLASS_IID (IPluginFactory) DEF_CLASS_IID (IPluginFactory2) DEF_CLASS_IID (IPluginFactory3) From b40af8465b6b686d2da21d3a88f9ab6d1de6201a Mon Sep 17 00:00:00 2001 From: hogliux Date: Wed, 22 Nov 2017 14:32:14 +0000 Subject: [PATCH 07/16] VST3: Removed some unused code --- .../format_types/juce_VST3PluginFormat.cpp | 97 ------------------- 1 file changed, 97 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 29f7d1a55d..b1adb56195 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -246,103 +246,6 @@ static void toProcessContext (Vst::ProcessContext& context, AudioPlayHead* playH context.state |= ProcessContext::kTimeSigValid; } -//============================================================================== -/** Get a list of speaker arrangements as per their speaker names - - (e.g.: 2 regular channels, aliased as 'kStringStereoS', is "L R") -*/ -static StringArray getSpeakerArrangements() -{ - using namespace Vst::SpeakerArr; - - const Vst::CString arrangements[] = - { - kStringMonoS, kStringStereoS, kStringStereoRS, kStringStereoCS, - kStringStereoSS, kStringStereoCLfeS, kString30CineS, kString30MusicS, - kString31CineS, kString31MusicS, kString40CineS, kString40MusicS, - kString41CineS, kString41MusicS, kString50S, kString51S, - kString60CineS, kString60MusicS, kString61CineS, kString61MusicS, - kString70CineS, kString70MusicS, kString71CineS, kString71MusicS, - kString80CineS, kString80MusicS, kString81CineS, kString81MusicS, - kString80CubeS, kStringBFormat1stOrderS, kString71CineTopCenterS, - kString71CineCenterHighS, kString71CineFrontHighS, kString71CineSideHighS, - kString71CineFullRearS, kString90S, kString91S, - kString100S, kString101S, kString110S, kString111S, - kString130S, kString131S, kString102S, kString122S, - nullptr - }; - - return StringArray (arrangements); -} - -/** Get a list of speaker arrangements as per their named configurations - - (e.g.: 2 regular channels, aliased as 'kStringStereoS', is "L R") -*/ -static StringArray getNamedSpeakerArrangements() -{ - using namespace Vst::SpeakerArr; - - const Vst::CString arrangements[] = - { - kStringEmpty, kStringMono, kStringStereo, kStringStereoR, - kStringStereoC, kStringStereoSide, kStringStereoCLfe, kString30Cine, - kString30Music, kString31Cine, kString31Music, kString40Cine, - kString40Music, kString41Cine, kString41Music, kString50, - kString51, kString60Cine, kString60Music, kString61Cine, - kString61Music, kString70Cine, kString70Music, kString71Cine, - kString71Music, kString71CineTopCenter, kString71CineCenterHigh, - kString71CineFrontHigh, kString71CineSideHigh, kString71CineFullRear, - kString80Cine, kString80Music, kString80Cube, kString81Cine, - kString81Music, kString102, kString122, kString90, - kString91, kString100, kString101, kString110, - kString111, kString130, kString131, - nullptr - }; - - return StringArray (arrangements); -} - -static Vst::SpeakerArrangement getSpeakerArrangementFrom (const String& string) -{ - return Vst::SpeakerArr::getSpeakerArrangementFromString (string.toUTF8()); -} - -//============================================================================== -static StringArray getPluginEffectCategories() -{ - using namespace Vst::PlugType; - - const Vst::CString categories[] = - { - kFxAnalyzer, kFxDelay, kFxDistortion, kFxDynamics, - kFxEQ, kFxFilter, kFx, kFxInstrument, - kFxInstrumentExternal, kFxSpatial, kFxGenerator, kFxMastering, - kFxModulation, kFxPitchShift, kFxRestoration, kFxReverb, - kFxSurround, kFxTools, kSpatial, kSpatialFx, - nullptr - }; - - return StringArray (categories); -} - -static StringArray getPluginInstrumentCategories() -{ - using namespace Vst::PlugType; - - const Vst::CString categories[] = - { - kInstrumentSynthSampler, kInstrumentDrum, - kInstrumentSampler, kInstrumentSynth, - kInstrumentExternal, kFxInstrument, - kFxInstrumentExternal, kFxSpatial, - kFxGenerator, - nullptr - }; - - return StringArray (categories); -} - //============================================================================== struct VST3PluginInstance; From 2206fae758e1570ba384f264b78df8ed950de146 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 23 Nov 2017 11:46:28 +0000 Subject: [PATCH 08/16] VST3: Removed more unused code in the VST3 wrapper --- .../juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 680bb50f2e..645dbe3dd0 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -2530,15 +2530,6 @@ struct JucePluginFactory : public IPluginFactory3 return true; } - bool isClassRegistered (const FUID& cid) const - { - for (int i = 0; i < classes.size(); ++i) - if (classes.getUnchecked (i)->infoW.cid == cid) - return true; - - return false; - } - //============================================================================== JUCE_DECLARE_VST3_COM_REF_METHODS From 9f6126779c63cbe2e07719d9453c0d506b562a25 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 12 Dec 2017 14:45:40 +0000 Subject: [PATCH 09/16] Fix for the analytics singleton --- modules/juce_analytics/analytics/juce_Analytics.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/juce_analytics/analytics/juce_Analytics.h b/modules/juce_analytics/analytics/juce_Analytics.h index 43009c1e88..9864d62d37 100644 --- a/modules/juce_analytics/analytics/juce_Analytics.h +++ b/modules/juce_analytics/analytics/juce_Analytics.h @@ -79,12 +79,14 @@ public: */ void setSuspended (bool shouldBeSuspended); - - juce_DeclareSingleton (Analytics, true) + #ifndef DOXYGEN + juce_DeclareSingleton (Analytics, false) + #endif private: //============================================================================== Analytics() = default; + ~Analytics() { clearSingletonInstance(); } String userId; StringPairArray userProperties; From af9526a1c3a1b96f71e6b86f7f13824b34732b9c Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Mon, 20 Nov 2017 18:01:18 +0000 Subject: [PATCH 10/16] DSP: Fixed a bug when oversampling multiple channels --- modules/juce_dsp/processors/juce_Oversampling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_dsp/processors/juce_Oversampling.cpp b/modules/juce_dsp/processors/juce_Oversampling.cpp index 2ce6ea6cb9..88589fd400 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.cpp +++ b/modules/juce_dsp/processors/juce_Oversampling.cpp @@ -282,7 +282,7 @@ public: SampleType normalizedTransitionWidthUp, SampleType stopbandAttenuationdBUp, SampleType normalizedTransitionWidthDown, - SampleType stopbandAttenuationdBDown) : OversamplingEngine (2, numChannels) + SampleType stopbandAttenuationdBDown) : OversamplingEngine (numChannels, 2) { auto structureUp = dsp::FilterDesign::designIIRLowpassHalfBandPolyphaseAllpassMethod (normalizedTransitionWidthUp, stopbandAttenuationdBUp); dsp::IIR::Coefficients coeffsUp = getCoefficients (structureUp); From 2a66f4a00e4798644f88f778c7f681f75c807b56 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Mon, 15 Jan 2018 09:59:17 +0000 Subject: [PATCH 11/16] Added the correct license banner to the files in the juce_analytics module --- .../juce_analytics/analytics/juce_Analytics.cpp | 14 +++++++++----- modules/juce_analytics/analytics/juce_Analytics.h | 14 +++++++++----- .../analytics/juce_ButtonTracker.cpp | 14 +++++++++----- .../juce_analytics/analytics/juce_ButtonTracker.h | 14 +++++++++----- .../destinations/juce_AnalyticsDestination.h | 14 +++++++++----- .../juce_ThreadedAnalyticsDestination.cpp | 14 +++++++++----- .../juce_ThreadedAnalyticsDestination.h | 14 +++++++++----- modules/juce_analytics/juce_analytics.h | 14 +++++++++----- 8 files changed, 72 insertions(+), 40 deletions(-) diff --git a/modules/juce_analytics/analytics/juce_Analytics.cpp b/modules/juce_analytics/analytics/juce_Analytics.cpp index 44f9768f68..b9a421b77e 100644 --- a/modules/juce_analytics/analytics/juce_Analytics.cpp +++ b/modules/juce_analytics/analytics/juce_Analytics.cpp @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/analytics/juce_Analytics.h b/modules/juce_analytics/analytics/juce_Analytics.h index 9864d62d37..30a6426c58 100644 --- a/modules/juce_analytics/analytics/juce_Analytics.h +++ b/modules/juce_analytics/analytics/juce_Analytics.h @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/analytics/juce_ButtonTracker.cpp b/modules/juce_analytics/analytics/juce_ButtonTracker.cpp index 3fc613df99..3528afc2d3 100644 --- a/modules/juce_analytics/analytics/juce_ButtonTracker.cpp +++ b/modules/juce_analytics/analytics/juce_ButtonTracker.cpp @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/analytics/juce_ButtonTracker.h b/modules/juce_analytics/analytics/juce_ButtonTracker.h index 3a85b63684..261899f3c2 100644 --- a/modules/juce_analytics/analytics/juce_ButtonTracker.h +++ b/modules/juce_analytics/analytics/juce_ButtonTracker.h @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/destinations/juce_AnalyticsDestination.h b/modules/juce_analytics/destinations/juce_AnalyticsDestination.h index 23c364db2e..9554e6c98a 100644 --- a/modules/juce_analytics/destinations/juce_AnalyticsDestination.h +++ b/modules/juce_analytics/destinations/juce_AnalyticsDestination.h @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp index 2d9b18d2d6..bf89652912 100644 --- a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp +++ b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.cpp @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.h b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.h index 3e7010865d..ae8bc9f43f 100644 --- a/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.h +++ b/modules/juce_analytics/destinations/juce_ThreadedAnalyticsDestination.h @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE diff --git a/modules/juce_analytics/juce_analytics.h b/modules/juce_analytics/juce_analytics.h index 01fdb09d2f..386b048318 100644 --- a/modules/juce_analytics/juce_analytics.h +++ b/modules/juce_analytics/juce_analytics.h @@ -7,11 +7,15 @@ JUCE is an open source library subject to commercial or open-source licensing. - The code included in this file is provided under the terms of the ISC license - http://www.isc.org/downloads/software-support-policy/isc-license. Permission - To use, copy, modify, and/or distribute this software for any purpose with or - without fee is hereby granted provided that the above copyright notice and - this permission notice appear in all copies. + By using JUCE, you agree to the terms of both the JUCE 5 End-User License + Agreement and JUCE 5 Privacy Policy (both updated and effective as of the + 27th April 2017). + + End User License Agreement: www.juce.com/juce-5-licence + Privacy Policy: www.juce.com/juce-5-privacy-policy + + Or: You may also use this code under the terms of the GPL v3 (see + www.gnu.org/licenses). JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE From e79663e5f5fa789ec99e96bcbf07a5cbadbf71f8 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 8 Jan 2018 12:36:24 +0000 Subject: [PATCH 12/16] Fix for dsp::ProcessorChain when used with a non-replacing context --- modules/juce_dsp/processors/juce_ProcessorChain.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h index 004380176d..4566c463ea 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain.h +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -72,7 +72,17 @@ namespace ProcessorHelpers // Internal helper classes used in building the Proc void process (ProcessContext& context) noexcept { Base::processor.process (context); - processors.process (context); + + if (context.usesSeparateInputAndOutputBlocks()) + { + jassert (context.getOutputBlock().getNumChannels() == context.getInputBlock().getNumChannels()); + ProcessContextReplacing replacingContext (context.getOutputBlock()); + processors.process (replacingContext); + } + else + { + processors.process (context); + } } void reset() From a222f42ec16e730c0438d2100e7b24a731792399 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Mon, 15 Jan 2018 10:55:18 +0000 Subject: [PATCH 13/16] VST3: Fixed a bug setting tail lengths --- modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 645dbe3dd0..278392a3b4 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1950,7 +1950,7 @@ public: { auto tailLengthSeconds = getPluginInstance().getTailLengthSeconds(); - if (tailLengthSeconds <= 0.0 || processSetup.sampleRate > 0.0) + if (tailLengthSeconds <= 0.0 || processSetup.sampleRate <= 0.0) return Vst::kNoTail; return (Steinberg::uint32) roundToIntAccurate (tailLengthSeconds * processSetup.sampleRate); From f204a99c6f0a058b90a1bff3c9241de7b70e5af1 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 15 Dec 2017 11:31:45 +0000 Subject: [PATCH 14/16] VST3: Fixed an issue with parallel streams of parameter updates during playback --- .../VST3/juce_VST3_Wrapper.cpp | 14 ++++++++++++-- .../processors/juce_AudioProcessor.h | 6 ++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 278392a3b4..3acee56ec9 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -241,7 +241,12 @@ public: if (v != valueNormalized) { valueNormalized = v; - owner.setParameter (paramIndex, static_cast (v)); + + // Only update the AudioProcessor here if we're not playing, + // otherwise we get parallel streams of parameter value updates + // during playback + if (owner.vst3IsPlaying.get() == 0) + owner.setParameter (paramIndex, static_cast (v)); changed(); return true; @@ -636,7 +641,6 @@ private: #endif Vst::ParamID bypassParamID; - //============================================================================== void setupParameters() { @@ -2032,9 +2036,15 @@ public: return kResultFalse; if (data.processContext != nullptr) + { processContext = *data.processContext; + pluginInstance->vst3IsPlaying = processContext.state & Vst::ProcessContext::kPlaying; + } else + { zerostruct (processContext); + pluginInstance->vst3IsPlaying = 0; + } midiBuffer.clear(); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 313c006da9..314fb912d0 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1614,6 +1614,12 @@ private: template void processBypassed (AudioBuffer&, MidiBuffer&); + #if JucePlugin_Build_VST3 + friend class JuceVST3EditController; + friend class JuceVST3Component; + Atomic vst3IsPlaying { 0 }; + #endif + // This method is no longer used - you can delete it from your AudioProcessor classes. JUCE_DEPRECATED_WITH_BODY (virtual bool silenceInProducesSilenceOut() const, { return false; }) From f503ca27011a707b73c70ea58ea65a412dbcad65 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Tue, 16 Jan 2018 16:38:18 +0000 Subject: [PATCH 15/16] Fixed a bug in the InterAppAudioEffect demo --- .../Source/IAAEffectEditor.h | 24 ++++++++++++------- .../InterAppAudioEffect/Source/SimpleMeter.h | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/examples/PlugInSamples/InterAppAudioEffect/Source/IAAEffectEditor.h b/examples/PlugInSamples/InterAppAudioEffect/Source/IAAEffectEditor.h index f27820d83d..f7e1cffc24 100644 --- a/examples/PlugInSamples/InterAppAudioEffect/Source/IAAEffectEditor.h +++ b/examples/PlugInSamples/InterAppAudioEffect/Source/IAAEffectEditor.h @@ -96,6 +96,11 @@ public: startTimerHz (60); } + ~IAAEffectEditor() + { + processor.removeMeterListener (*this); + } + //============================================================================== void paint (Graphics& g) override { @@ -145,6 +150,7 @@ private: { auto timeInfoSuccess = processor.updateCurrentTimeInfoFromHost (lastPosInfo); transportText.setVisible (timeInfoSuccess); + if (timeInfoSuccess) updateTransportTextDisplay(); @@ -157,6 +163,7 @@ private: void buttonClicked (Button* b) override { auto playHead = processor.getPlayHead(); + if (playHead != nullptr && playHead->canControlTransport()) { if (b == &rewindButton) @@ -215,10 +222,10 @@ private: MemoryOutputStream displayText; displayText << "[" << SystemStats::getJUCEVersion() << "]\n" - << String (lastPosInfo.bpm, 2) << " bpm\n" - << lastPosInfo.timeSigNumerator << '/' << lastPosInfo.timeSigDenominator << "\n" - << timeToTimecodeString (lastPosInfo.timeInSeconds) << "\n" - << quarterNotePositionToBarsBeatsString (lastPosInfo.ppqPosition, + << String (lastPosInfo.bpm, 2) << " bpm\n" + << lastPosInfo.timeSigNumerator << '/' << lastPosInfo.timeSigDenominator << "\n" + << timeToTimecodeString (lastPosInfo.timeInSeconds) << "\n" + << quarterNotePositionToBarsBeatsString (lastPosInfo.ppqPosition, lastPosInfo.timeSigNumerator, lastPosInfo.timeSigDenominator) << "\n"; @@ -257,13 +264,15 @@ private: void updateSwitchToHostDisplay() { PluginHostType hostType; - const bool visible = hostType.isInterAppAudioConnected(); + auto visible = hostType.isInterAppAudioConnected(); if (switchToHostButtonLabel.isVisible() != visible) { switchToHostButtonLabel.setVisible (visible); switchToHostButton.setVisible (visible); - if (visible) { + + if (visible) + { auto icon = hostType.getHostIcon (buttonSize); switchToHostButton.setImages(false, true, true, icon, 1.0, Colours::transparentBlack, @@ -283,13 +292,12 @@ private: ShapeButton recordButton {"Record", defaultButtonColour, defaultButtonColour, defaultButtonColour}; Slider gainSlider; - AudioProcessorValueTreeState::SliderAttachment gainAttachment = {parameters, "gain", gainSlider}; + AudioProcessorValueTreeState::SliderAttachment gainAttachment = { parameters, "gain", gainSlider }; std::array meters; ImageButton switchToHostButton; Label transportText, switchToHostButtonLabel; - Image hostImage; AudioPlayHead::CurrentPositionInfo lastPosInfo; diff --git a/examples/PlugInSamples/InterAppAudioEffect/Source/SimpleMeter.h b/examples/PlugInSamples/InterAppAudioEffect/Source/SimpleMeter.h index 7f963b0f14..14cfa94f34 100644 --- a/examples/PlugInSamples/InterAppAudioEffect/Source/SimpleMeter.h +++ b/examples/PlugInSamples/InterAppAudioEffect/Source/SimpleMeter.h @@ -72,6 +72,7 @@ private: auto callbackLevel = maxLevel.exchange (0.0); auto decayFactor = 0.95; + if (callbackLevel > level) level = callbackLevel; else if (level > 0.001) From c46cb12c46cede102893683bc2941bd005d45083 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Wed, 17 Jan 2018 15:18:22 +0000 Subject: [PATCH 16/16] Fixed a bug with some ifdeffed VST3 code in the AudioProcessor definition --- modules/juce_audio_processors/processors/juce_AudioProcessor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 314fb912d0..6d87648ce3 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -1617,9 +1617,10 @@ private: #if JucePlugin_Build_VST3 friend class JuceVST3EditController; friend class JuceVST3Component; - Atomic vst3IsPlaying { 0 }; #endif + Atomic vst3IsPlaying { 0 }; + // This method is no longer used - you can delete it from your AudioProcessor classes. JUCE_DEPRECATED_WITH_BODY (virtual bool silenceInProducesSilenceOut() const, { return false; })