diff --git a/src/audio/plugin_client/RTAS/juce_RTAS_MacUtilities.mm b/src/audio/plugin_client/RTAS/juce_RTAS_MacUtilities.mm index 33da2daec8..a469d7b3a2 100644 --- a/src/audio/plugin_client/RTAS/juce_RTAS_MacUtilities.mm +++ b/src/audio/plugin_client/RTAS/juce_RTAS_MacUtilities.mm @@ -69,20 +69,22 @@ void* attachSubWindow (void* hostWindowRef, Component* comp) NSRect hostWindowScreenFrame = [[hostWindow screen] frame]; + const int mainScreenHeight = [[[NSScreen screens] objectAtIndex: 0] frame].size.height; + #if WINDOWPOSITION_BODGE { Rect winBounds; GetWindowBounds ((WindowRef) hostWindowRef, kWindowContentRgn, &winBounds); NSRect w = [hostWindow frame]; w.origin.x = winBounds.left; - w.origin.y = hostWindowScreenFrame.size.height + hostWindowScreenFrame.origin.y - winBounds.bottom; + w.origin.y = mainScreenHeight - winBounds.bottom; [hostWindow setFrame: w display: NO animate: NO]; } #endif NSPoint windowPos = [hostWindow convertBaseToScreen: f.origin]; windowPos.x = windowPos.x + jmax (0.0f, (oldWindowFrame.size.width - f.size.width) / 2.0f); - windowPos.y = hostWindowScreenFrame.size.height + hostWindowScreenFrame.origin.y - (windowPos.y + f.size.height); + windowPos.y = mainScreenHeight - (windowPos.y + f.size.height); comp->setTopLeftPosition ((int) windowPos.x, (int) windowPos.y); diff --git a/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp b/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp index a157645cb2..38535ef304 100644 --- a/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp +++ b/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp @@ -603,9 +603,19 @@ public: for (; i < numIn; ++i) channels[i] = inputs[i]; - AudioSampleBuffer chans (channels, jmax (numIn, numOut), numSamples); + { + AudioSampleBuffer chans (channels, jmax (numIn, numOut), numSamples); + filter->processBlock (chans, midiEvents); + } - filter->processBlock (chans, midiEvents); + // copy back any temp channels that may have been used.. + for (i = 0; i < numOut; ++i) + { + const float* const chan = tempChannels.getUnchecked(i); + + if (chan != nullptr) + memcpy (outputs[i], chan, sizeof (float) * numSamples); + } } }