You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.6KB

  1. diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
  2. index 3e63d3372..c09d99fc3 100644
  3. --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
  4. +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
  5. @@ -61,10 +61,7 @@
  6. #define __cdecl
  7. #endif
  8. - namespace Vst2
  9. - {
  10. - #include "pluginterfaces/vst2.x/vstfxstore.h"
  11. - }
  12. + #include <juce_audio_processors/format_types/juce_VSTInterface.h>
  13. #endif
  14. @@ -1967,16 +1964,16 @@ public:
  15. bool loadVST2CcnKBlock (const char* data, int size)
  16. {
  17. - auto* bank = reinterpret_cast<const Vst2::fxBank*> (data);
  18. + auto* bank = reinterpret_cast<const vst2FxBank*> (data);
  19. - jassert (ByteOrder::bigEndianInt ("CcnK") == htonl ((uint32) bank->chunkMagic));
  20. - jassert (ByteOrder::bigEndianInt ("FBCh") == htonl ((uint32) bank->fxMagic));
  21. - jassert (htonl ((uint32) bank->version) == 1 || htonl ((uint32) bank->version) == 2);
  22. + jassert (ByteOrder::bigEndianInt ("CcnK") == htonl ((uint32) bank->magic1));
  23. + jassert (ByteOrder::bigEndianInt ("FBCh") == htonl ((uint32) bank->magic2));
  24. + jassert (htonl ((uint32) bank->version1) == 1 || htonl ((uint32) bank->version1) == 2);
  25. jassert (JucePlugin_VSTUniqueID == htonl ((uint32) bank->fxID));
  26. - setStateInformation (bank->content.data.chunk,
  27. - jmin ((int) (size - (bank->content.data.chunk - data)),
  28. - (int) htonl ((uint32) bank->content.data.size)));
  29. + setStateInformation (bank->chunk,
  30. + jmin ((int) (size - (bank->chunk - data)),
  31. + (int) htonl ((uint32) bank->chunkSize)));
  32. return true;
  33. }
  34. @@ -2172,16 +2169,16 @@ public:
  35. return status;
  36. const int bankBlockSize = 160;
  37. - Vst2::fxBank bank;
  38. + vst2FxBank bank;
  39. zerostruct (bank);
  40. - bank.chunkMagic = (int32) htonl (ByteOrder::bigEndianInt ("CcnK"));
  41. - bank.byteSize = (int32) htonl (bankBlockSize - 8 + (unsigned int) mem.getSize());
  42. - bank.fxMagic = (int32) htonl (ByteOrder::bigEndianInt ("FBCh"));
  43. - bank.version = (int32) htonl (2);
  44. - bank.fxID = (int32) htonl (JucePlugin_VSTUniqueID);
  45. - bank.fxVersion = (int32) htonl (JucePlugin_VersionCode);
  46. - bank.content.data.size = (int32) htonl ((unsigned int) mem.getSize());
  47. + bank.magic1 = (int32) htonl (ByteOrder::bigEndianInt ("CcnK"));
  48. + bank.size = (int32) htonl (bankBlockSize - 8 + (unsigned int) mem.getSize());
  49. + bank.magic2 = (int32) htonl (ByteOrder::bigEndianInt ("FBCh"));
  50. + bank.version1 = (int32) htonl (2);
  51. + bank.fxID = (int32) htonl (JucePlugin_VSTUniqueID);
  52. + bank.version2 = (int32) htonl (JucePlugin_VersionCode);
  53. + bank.chunkSize = (int32) htonl ((unsigned int) mem.getSize());
  54. status = state->write (&bank, bankBlockSize);
  55. diff --git a/modules/juce_audio_processors/format_types/juce_VSTInterface.h b/modules/juce_audio_processors/format_types/juce_VSTInterface.h
  56. index 1b3eb7d08..58179be1a 100644
  57. --- a/modules/juce_audio_processors/format_types/juce_VSTInterface.h
  58. +++ b/modules/juce_audio_processors/format_types/juce_VSTInterface.h
  59. @@ -506,7 +506,7 @@ enum PresonusExtensionConstants
  60. @tags{Audio}
  61. */
  62. -struct fxBank
  63. +struct vst2FxBank
  64. {
  65. int32 magic1;
  66. int32 size;