Browse Source

Use juce vst interface for vst3 "can replace vst2" mode

Signed-off-by: falkTX <falktx@falktx.com>
tags/2020-12-27
falkTX 4 years ago
parent
commit
c0d6ab4807
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 15 additions and 15 deletions
  1. +14
    -14
      libs/juce-current/source/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
  2. +1
    -1
      libs/juce-current/source/modules/juce_audio_processors/format_types/juce_VSTInterface.h

+ 14
- 14
libs/juce-current/source/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp View File

@@ -58,7 +58,7 @@
#if JUCE_VST3_CAN_REPLACE_VST2
namespace Vst2
{
#include "pluginterfaces/vst2.x/vstfxstore.h"
#include "../../juce_audio_processors/format_types/juce_VSTInterface.h"
}
#endif
@@ -1961,14 +1961,14 @@ public:
{
auto* bank = reinterpret_cast<const Vst2::fxBank*> (data);
jassert ('CcnK' == htonl (bank->chunkMagic));
jassert ('FBCh' == htonl (bank->fxMagic));
jassert (htonl (bank->version) == 1 || htonl (bank->version) == 2);
jassert ('CcnK' == htonl (bank->magic1));
jassert ('FBCh' == htonl (bank->magic2));
jassert (htonl (bank->version1) == 1 || htonl (bank->version1) == 2);
jassert (JucePlugin_VSTUniqueID == htonl (bank->fxID));
setStateInformation (bank->content.data.chunk,
jmin ((int) (size - (bank->content.data.chunk - data)),
(int) htonl (bank->content.data.size)));
setStateInformation (bank->chunk,
jmin ((int) (size - (bank->chunk - data)),
(int) htonl (bank->chunkSize)));
return true;
}
@@ -2167,13 +2167,13 @@ public:
Vst2::fxBank bank;
zerostruct (bank);
bank.chunkMagic = (int32) htonl ('CcnK');
bank.byteSize = (int32) htonl (bankBlockSize - 8 + (unsigned int) mem.getSize());
bank.fxMagic = (int32) htonl ('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 ('CcnK');
bank.size = (int32) htonl (bankBlockSize - 8 + (unsigned int) mem.getSize());
bank.magic2 = (int32) htonl ('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);


+ 1
- 1
libs/juce-current/source/modules/juce_audio_processors/format_types/juce_VSTInterface.h View File

@@ -506,7 +506,7 @@ enum PresonusExtensionConstants
@tags{Audio}
*/
struct vst2FxBank
struct fxBank
{
int32 magic1;
int32 size;


Loading…
Cancel
Save