From 0353100706fd88d919ef7315fa290a249eb71112 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 25 Mar 2013 16:17:46 +0000 Subject: [PATCH] VST plugin structs: changed some longs to VstInt32s. --- .../format_types/juce_VSTPluginFormat.cpp | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 93473f1e46..13e911434f 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -85,64 +85,64 @@ const int fxbVersionNum = 1; struct fxProgram { - long chunkMagic; // 'CcnK' - long byteSize; // of this chunk, excl. magic + byteSize - long fxMagic; // 'FxCk' - long version; - long fxID; // fx unique id - long fxVersion; - long numParams; + VstInt32 chunkMagic; // 'CcnK' + VstInt32 byteSize; // of this chunk, excl. magic + byteSize + VstInt32 fxMagic; // 'FxCk' + VstInt32 version; + VstInt32 fxID; // fx unique id + VstInt32 fxVersion; + VstInt32 numParams; char prgName[28]; float params[1]; // variable no. of parameters }; struct fxSet { - long chunkMagic; // 'CcnK' - long byteSize; // of this chunk, excl. magic + byteSize - long fxMagic; // 'FxBk' - long version; - long fxID; // fx unique id - long fxVersion; - long numPrograms; + VstInt32 chunkMagic; // 'CcnK' + VstInt32 byteSize; // of this chunk, excl. magic + byteSize + VstInt32 fxMagic; // 'FxBk' + VstInt32 version; + VstInt32 fxID; // fx unique id + VstInt32 fxVersion; + VstInt32 numPrograms; char future[128]; fxProgram programs[1]; // variable no. of programs }; struct fxChunkSet { - long chunkMagic; // 'CcnK' - long byteSize; // of this chunk, excl. magic + byteSize - long fxMagic; // 'FxCh', 'FPCh', or 'FBCh' - long version; - long fxID; // fx unique id - long fxVersion; - long numPrograms; + VstInt32 chunkMagic; // 'CcnK' + VstInt32 byteSize; // of this chunk, excl. magic + byteSize + VstInt32 fxMagic; // 'FxCh', 'FPCh', or 'FBCh' + VstInt32 version; + VstInt32 fxID; // fx unique id + VstInt32 fxVersion; + VstInt32 numPrograms; char future[128]; - long chunkSize; + VstInt32 chunkSize; char chunk[8]; // variable }; struct fxProgramSet { - long chunkMagic; // 'CcnK' - long byteSize; // of this chunk, excl. magic + byteSize - long fxMagic; // 'FxCh', 'FPCh', or 'FBCh' - long version; - long fxID; // fx unique id - long fxVersion; - long numPrograms; + VstInt32 chunkMagic; // 'CcnK' + VstInt32 byteSize; // of this chunk, excl. magic + byteSize + VstInt32 fxMagic; // 'FxCh', 'FPCh', or 'FBCh' + VstInt32 version; + VstInt32 fxID; // fx unique id + VstInt32 fxVersion; + VstInt32 numPrograms; char name[28]; - long chunkSize; + VstInt32 chunkSize; char chunk[8]; // variable }; namespace { - long vst_swap (const long x) noexcept + VstInt32 vst_swap (const VstInt32 x) noexcept { #ifdef JUCE_LITTLE_ENDIAN - return (long) ByteOrder::swap ((uint32) x); + return (VstInt32) ByteOrder::swap ((uint32) x); #else return x; #endif @@ -1573,7 +1573,7 @@ public: set->fxID = vst_swap (getUID()); set->fxVersion = vst_swap (getVersionNumber()); set->numPrograms = vst_swap (numPrograms); - set->chunkSize = vst_swap ((long) chunk.getSize()); + set->chunkSize = vst_swap ((VstInt32) chunk.getSize()); chunk.copyTo (set->chunk, 0, chunk.getSize()); } @@ -1590,7 +1590,7 @@ public: set->fxID = vst_swap (getUID()); set->fxVersion = vst_swap (getVersionNumber()); set->numPrograms = vst_swap (numPrograms); - set->chunkSize = vst_swap ((long) chunk.getSize()); + set->chunkSize = vst_swap ((VstInt32) chunk.getSize()); getCurrentProgramName().copyToUTF8 (set->name, sizeof (set->name) - 1); chunk.copyTo (set->chunk, 0, chunk.getSize());