From 6d4549499cd002f2b9d293ee03e8773cced6a73b Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Tue, 26 Feb 2019 08:19:50 +0000 Subject: [PATCH 1/4] Fixed an issue where AudioProcessorGraph would drop MIDI notes close to the playhead when started --- .../processors/juce_AudioProcessorGraph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 1192c64f43..44f538a55b 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -1246,7 +1246,7 @@ void AudioProcessorGraph::prepareToPlay (double sampleRate, int estimatedSamples setRateAndBufferSizeDetails (sampleRate, estimatedSamplesPerBlock); clearRenderingSequence(); - if (isNonRealtime() && MessageManager::getInstance()->isThisTheMessageThread()) + if (MessageManager::getInstance()->isThisTheMessageThread()) handleAsyncUpdate(); else triggerAsyncUpdate(); From a672353ebc038f8e13c60ce050436f0eaf40e2ce Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 26 Feb 2019 10:58:57 +0000 Subject: [PATCH 2/4] VST3: Added a missing case statement from getChannelType() --- modules/juce_audio_processors/format_types/juce_VST3Common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index 17b9c0cdfc..7e4887293d 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -237,7 +237,8 @@ static inline AudioChannelSet::ChannelType getChannelType (Steinberg::Vst::Speak case Steinberg::Vst::kSpeakerTrc: return AudioChannelSet::topRearCentre; case Steinberg::Vst::kSpeakerTrr: return AudioChannelSet::topRearRight; case Steinberg::Vst::kSpeakerLfe2: return AudioChannelSet::LFE2; - case Steinberg::Vst::kSpeakerACN0: return ((arr & Steinberg::Vst::kSpeakerC) != 0 ? AudioChannelSet::discreteChannel0 : AudioChannelSet::centre); /* kSpeakerACN0 */ + case Steinberg::Vst::kSpeakerM: return ((arr & Steinberg::Vst::kSpeakerC) != 0 ? AudioChannelSet::discreteChannel0 : AudioChannelSet::centre); + case Steinberg::Vst::kSpeakerACN0: return AudioChannelSet::ambisonicACN0; case Steinberg::Vst::kSpeakerACN1: return AudioChannelSet::ambisonicACN1; case Steinberg::Vst::kSpeakerACN2: return AudioChannelSet::ambisonicACN2; case Steinberg::Vst::kSpeakerACN3: return AudioChannelSet::ambisonicACN3; From 831448fbb05c2f8bcfe301b83d92703436cc64c9 Mon Sep 17 00:00:00 2001 From: dimitri Date: Tue, 26 Feb 2019 09:54:21 +0000 Subject: [PATCH 3/4] Blocks: Use special reset message for master blocks --- .../protocol/juce_BlocksProtocolDefinitions.h | 5 +++++ .../internal/juce_BlockImplementation.cpp | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h b/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h index 743128a500..984a8b2472 100644 --- a/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h +++ b/modules/juce_blocks_basics/protocol/juce_BlocksProtocolDefinitions.h @@ -87,6 +87,11 @@ enum class MessageFromHost setName = 0x20 }; +/** Messages that the host may send to a device that do not have the usual message format */ +namespace SpecialMessageFromHost +{ + constexpr uint8 resetMaster[6] = { 0xf0, 0x00, 0x21, 0x10, 0x49, 0xf7 }; +} /** This is the first item in a BLOCKS message, identifying the message type. */ using MessageType = IntegerWithBitSize<7>; diff --git a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp index 4e327e486d..bb32758c18 100644 --- a/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp +++ b/modules/juce_blocks_basics/topology/internal/juce_BlockImplementation.cpp @@ -532,8 +532,21 @@ public: void blockReset() override { - if (buildAndSendPacket<32> ([] (BlocksProtocol::HostPacketBuilder<32>& p) - { return p.addBlockReset(); })) + bool messageSent = false; + + if (isMasterBlock()) + { + sendMessage (BlocksProtocol::SpecialMessageFromHost::resetMaster, + sizeof (BlocksProtocol::SpecialMessageFromHost::resetMaster)); + messageSent = true; + } + else + { + messageSent = buildAndSendPacket<32> ([] (BlocksProtocol::HostPacketBuilder<32>& p) + { return p.addBlockReset(); }); + } + + if (messageSent) { hasBeenPowerCycled = true; From 77db5fde66d0946103f544e17ebbcc748bf6fb56 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 27 Feb 2019 09:35:39 +0000 Subject: [PATCH 4/4] Windows: Fix a double definition warning for juce_shouldDoubleScaleNativeGLWindow() when not building any VSTs --- .../juce_audio_plugin_client/utility/juce_PluginUtilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp index e9309be639..2665048b06 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp +++ b/modules/juce_audio_plugin_client/utility/juce_PluginUtilities.cpp @@ -44,7 +44,7 @@ std::function PluginHostType::jucePlugInIsRunningInAudioS bool juce_isRunningInUnity() { return PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_Unity; } #endif -#if JUCE_MODULE_AVAILABLE_juce_opengl +#if JUCE_MODULE_AVAILABLE_juce_opengl && (JucePlugin_Build_VST || JucePlugin_Build_VST3) bool juce_shouldDoubleScaleNativeGLWindow() { auto wrapperType = PluginHostType::getPluginLoadedAs();