Browse Source

Add patch for vst3 build fix with old interface

tags/2020-12-27
falkTX 2 years ago
parent
commit
efdd6b18f3
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 78 additions and 0 deletions
  1. +78
    -0
      libs/juce-current/patches/04_vst2-interface_pt2.patch

+ 78
- 0
libs/juce-current/patches/04_vst2-interface_pt2.patch View File

@@ -0,0 +1,78 @@
diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
index 3e63d3372..c09d99fc3 100644
--- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
+++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
@@ -61,10 +61,7 @@
#define __cdecl
#endif
- namespace Vst2
- {
- #include "pluginterfaces/vst2.x/vstfxstore.h"
- }
+ #include <juce_audio_processors/format_types/juce_VSTInterface.h>
#endif
@@ -1967,16 +1964,16 @@ public:
bool loadVST2CcnKBlock (const char* data, int size)
{
- auto* bank = reinterpret_cast<const Vst2::fxBank*> (data);
+ auto* bank = reinterpret_cast<const vst2FxBank*> (data);
- jassert (ByteOrder::bigEndianInt ("CcnK") == htonl ((uint32) bank->chunkMagic));
- jassert (ByteOrder::bigEndianInt ("FBCh") == htonl ((uint32) bank->fxMagic));
- jassert (htonl ((uint32) bank->version) == 1 || htonl ((uint32) bank->version) == 2);
+ jassert (ByteOrder::bigEndianInt ("CcnK") == htonl ((uint32) bank->magic1));
+ jassert (ByteOrder::bigEndianInt ("FBCh") == htonl ((uint32) bank->magic2));
+ jassert (htonl ((uint32) bank->version1) == 1 || htonl ((uint32) bank->version1) == 2);
jassert (JucePlugin_VSTUniqueID == htonl ((uint32) bank->fxID));
- setStateInformation (bank->content.data.chunk,
- jmin ((int) (size - (bank->content.data.chunk - data)),
- (int) htonl ((uint32) bank->content.data.size)));
+ setStateInformation (bank->chunk,
+ jmin ((int) (size - (bank->chunk - data)),
+ (int) htonl ((uint32) bank->chunkSize)));
return true;
}
@@ -2172,16 +2169,16 @@ public:
return status;
const int bankBlockSize = 160;
- Vst2::fxBank bank;
+ vst2FxBank bank;
zerostruct (bank);
- bank.chunkMagic = (int32) htonl (ByteOrder::bigEndianInt ("CcnK"));
- bank.byteSize = (int32) htonl (bankBlockSize - 8 + (unsigned int) mem.getSize());
- bank.fxMagic = (int32) htonl (ByteOrder::bigEndianInt ("FBCh"));
- bank.version = (int32) htonl (2);
- bank.fxID = (int32) htonl (JucePlugin_VSTUniqueID);
- bank.fxVersion = (int32) htonl (JucePlugin_VersionCode);
- bank.content.data.size = (int32) htonl ((unsigned int) mem.getSize());
+ bank.magic1 = (int32) htonl (ByteOrder::bigEndianInt ("CcnK"));
+ bank.size = (int32) htonl (bankBlockSize - 8 + (unsigned int) mem.getSize());
+ bank.magic2 = (int32) htonl (ByteOrder::bigEndianInt ("FBCh"));
+ bank.version1 = (int32) htonl (2);
+ bank.fxID = (int32) htonl (JucePlugin_VSTUniqueID);
+ bank.version2 = (int32) htonl (JucePlugin_VersionCode);
+ bank.chunkSize = (int32) htonl ((unsigned int) mem.getSize());
status = state->write (&bank, bankBlockSize);
diff --git a/modules/juce_audio_processors/format_types/juce_VSTInterface.h b/modules/juce_audio_processors/format_types/juce_VSTInterface.h
index 1b3eb7d08..58179be1a 100644
--- a/modules/juce_audio_processors/format_types/juce_VSTInterface.h
+++ b/modules/juce_audio_processors/format_types/juce_VSTInterface.h
@@ -506,7 +506,7 @@ enum PresonusExtensionConstants
@tags{Audio}
*/
-struct fxBank
+struct vst2FxBank
{
int32 magic1;
int32 size;

Loading…
Cancel
Save