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

VST fix. Minor clean-ups.

This commit is contained in:
Julian Storer 2011-08-22 19:34:36 +01:00
parent d55b7419ec
commit 3bc96b347a
3 changed files with 23 additions and 47 deletions

View file

@ -1779,8 +1779,12 @@ private:
void removeView (HIViewRef)
{
owner->dispatch (effEditClose, 0, 0, 0, 0);
owner->dispatch (effEditSleep, 0, 0, 0, 0);
if (owner->isOpen)
{
owner->isOpen = false;
owner->dispatch (effEditClose, 0, 0, 0, 0);
owner->dispatch (effEditSleep, 0, 0, 0, 0);
}
}
bool getEmbeddedViewSize (int& w, int& h)
@ -1992,11 +1996,11 @@ bool VSTPluginInstance::saveToFXBFile (MemoryBlock& dest, bool isFXB, int maxSiz
if (usesChunks())
{
MemoryBlock chunk;
getChunkData (chunk, ! isFXB, maxSizeMB);
if (isFXB)
{
MemoryBlock chunk;
getChunkData (chunk, false, maxSizeMB);
const size_t totalLen = sizeof (fxChunkSet) + chunk.getSize() - 8;
dest.setSize (totalLen, true);
@ -2014,9 +2018,6 @@ bool VSTPluginInstance::saveToFXBFile (MemoryBlock& dest, bool isFXB, int maxSiz
}
else
{
MemoryBlock chunk;
getChunkData (chunk, true, maxSizeMB);
const size_t totalLen = sizeof (fxProgramSet) + chunk.getSize() - 8;
dest.setSize (totalLen, true);