set getchunk setchunk

This commit is contained in:
Lucas Cordiviola 2024-04-19 04:28:23 -03:00
parent 9f67aa682a
commit af7afaf8b2
2 changed files with 19 additions and 0 deletions

View File

@ -226,6 +226,7 @@ pdvst::pdvst(audioMasterCallback audioMaster)
// {JYG see pdvst::setProgram below for explanation // {JYG see pdvst::setProgram below for explanation
timeFromStartup=GetTickCount(); timeFromStartup=GetTickCount();
// JYG } // JYG }
programsAreChunks(true);
} }
pdvst::~pdvst() pdvst::~pdvst()
@ -600,6 +601,20 @@ bool pdvst::getOutputProperties(VstInt32 index, VstPinProperties* properties)
return false; return false;
} }
VstInt32 pdvst::getChunk (void** data, bool isPreset)
{
MessageBox(0,"getchunk","debug",MB_OK);
strcpy ((char *)*data, "hello world");
return 11;
}
VstInt32 pdvst::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
MessageBox(0,"setchunk","debug",MB_OK);
debugLog("setchunk: %s", data);
return 1;
}
VstInt32 pdvst::canDo(char* text) VstInt32 pdvst::canDo(char* text)
{ {
//if (isASynth) //if (isASynth)

View File

@ -106,6 +106,9 @@ public:
HWND pdGui; HWND pdGui;
virtual VstInt32 getChunk (void** data, bool isPreset = false);
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset = false);
protected: protected:
static int referenceCount; static int referenceCount;
void debugLog(char *fmt, ...); void debugLog(char *fmt, ...);
@ -170,6 +173,7 @@ protected:
// JYG } // JYG }
//void programsAreChunks (bool) {}
}; };
#endif #endif