mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
Copied a couple of audio plugin fixes across from the modules branch.
This commit is contained in:
parent
62ea670f73
commit
bf6f41d8a4
2 changed files with 16 additions and 4 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue