1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Maxence Grandidier 2019-02-27 11:55:27 +01:00
commit 59a3c567cd
5 changed files with 24 additions and 5 deletions

View file

@ -44,7 +44,7 @@ std::function<bool(AudioProcessor&)> 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();

View file

@ -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;

View file

@ -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();

View file

@ -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>;

View file

@ -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;