programsarechunks flag working

Lucas Cordiviola 2 weeks ago
parent ba3b030e41
commit ac13c2a1bd
  1. 5
      build/Release64/Pd_Chunks-test/Pd_Chunks-test.pdv
  2. 2
      build/Release64/Pd_Gain-nogui/Pd_Gain-nogui.pdv
  3. 2
      vst-scheduler/vstschedlib.c
  4. 5
      vst-template/pdvst.cpp
  5. 1
      vst-template/pdvst.hpp
  6. 13
      vst-template/pdvstMain.cpp

@ -25,6 +25,11 @@ DEBUG = TRUE
# ***OBSOLETE, use [declare] inside patch instead***
#LIB =
# Save and Get Pd lists in .fxp file via ([s svstdata] and [r rvstdata])
# Some hosts don't work correctly with this.
# If in doubt just use FALSE.
PROGRAMSARECHUNKS = TRUE
# Number of VST parameters (up to 128)
PARAMETERS = 1

@ -23,7 +23,7 @@ DEBUG = FALSE
# External libraries (comma delimited list, relative to pdvst/)
# ***OBSOLETE, use [declare] inside patch instead***
#LIB =
#LIB =
# Number of VST parameters (up to 128)
PARAMETERS = 1

@ -492,7 +492,7 @@ int scheduler()
pdvstData->plugName.updated=0;
}
// lucarda get data chunk from file
// get data chunk from file
if (pdvstData->datachunk.direction == PD_RECEIVE && \
pdvstData->datachunk.updated)
{

@ -56,6 +56,7 @@ extern char globalHostPdvstPath[MAXFILENAMELEN];
extern bool globalCustomGui;
extern int globalCustomGuiWidth;
extern int globalCustomGuiHeight;
extern bool globalProgramsAreChunks;
extern bool globalIsASynth;
extern pdvstProgram globalProgram[MAXPROGRAMS];
@ -226,7 +227,7 @@ pdvst::pdvst(audioMasterCallback audioMaster)
// {JYG see pdvst::setProgram below for explanation
timeFromStartup=GetTickCount();
// JYG }
programsAreChunks(false);
programsAreChunks(globalProgramsAreChunks);
sendPlugName(globalPluginName);
}
@ -616,7 +617,7 @@ VstInt32 pdvst::getChunk (void** data, bool isPreset)
VstInt32 pdvst::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
MessageBox(NULL,"debug","setchunk",MB_OK);
//MessageBox(NULL,"debug","setchunk",MB_OK);
WaitForSingleObject(pdvstTransferMutex, 10);
{
pdvstData->datachunk.direction = PD_RECEIVE;

@ -173,7 +173,6 @@ protected:
// JYG }
//void programsAreChunks (bool) {}
};
#endif

@ -44,6 +44,7 @@ bool globalCustomGui = false;
int globalCustomGuiWidth= 320;
int globalCustomGuiHeight= 150;
pdvstProgram globalProgram[MAXPROGRAMS];
bool globalProgramsAreChunks = false;
char *trimWhitespace(char *str);
void parseSetupFile();
@ -376,6 +377,18 @@ void parseSetupFile()
globalProgram[progNum].paramValue[paramNum] = \
(float)atof(value);
}
// programsarechunks (save custom data in .fxb file)
if (strcmp(param, "programsarechunks") == 0)
{
if (strcmp(strlwr(value), "true") == 0)
{
globalProgramsAreChunks = true;
}
else if (strcmp(strlwr(value), "false") == 0)
{
globalProgramsAreChunks = false;
}
}
}
}
}

Loading…
Cancel
Save