I cannot determine why not!
My first IPlug project is saving restoring chunks just fine (once I discovered to
Code:
#define PLUG_DOES_STATE_CHUNKS 1
it solved the problem.) That was then...
This time on a new project I have made sure to:
-declare the methods in the plugin class.
Code:
bool SerializeState(ByteChunk* pChunk);
int UnserializeState(ByteChunk* pChunk, int startPos);
-define the functions in the class .cpp source.
Code:
bool Myplug::SerializeState(ByteChunk* pChunk)
{
TRACE;
IMutexLock lock(this);
int plugVersion = GetEffectVersion(false);
pChunk->Put(&plugVersion);
DBGMSG("Save in chunk (version): %x", plugVersion);
return IPlugBase::SerializeParams(pChunk);
}
int Myplug::UnserializeState(ByteChunk* pChunk, int startPos)
{
TRACE;
IMutexLock lock(this);
int plugVersionInState;
startPos = pChunk->Get(&plugVersionInState, startPos);
DBGMSG("Recall from chunk (version): %x", plugVersionInState);
return IPlugBase::UnserializeParams(pChunk, startPos);
}
-change PLUG_DOES_STATE_CHUNKS as above.
Is there anything else I need to do? Looking at my other project I can't see anything else. I have breakpoints and debug messages in both methods, so I'm sure that they're not happening.
Thanks for any suggestions