Remove unused code.

git-svn-id: svn://localhost/ardour2/branches/3.0@10806 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-11-23 19:30:01 +00:00
parent 9040712ab9
commit 45cc96f9d1

View file

@ -769,142 +769,3 @@ htonf (float v)
fout[3] = fin[0];
return result;
}
/*load_state and save_state do not appear to be needed (yet) in ardour
- untested at the moment, these are just replicas of the fst code*/
#if 0
int vstfx_load_state (VSTState* vstfx, char * filename)
{
FILE* f = fopen (filename, "rb");
if(f)
{
char testMagic[sizeof (magic)];
fread (&testMagic, sizeof (magic), 1, f);
if (strcmp (testMagic, magic))
{
printf ("File corrupt\n");
return FALSE;
}
char productString[64];
char vendorString[64];
char effectName[64];
char testString[64];
unsigned length;
int success;
fread (&length, sizeof (unsigned), 1, f);
length = htonl (length);
fread (productString, length, 1, f);
productString[length] = 0;
printf ("Product string: %s\n", productString);
success = vstfx_call_dispatcher(vstfx, effGetProductString, 0, 0, testString, 0);
if (success == 1)
{
if (strcmp (testString, productString) != 0)
{
printf ("Product string mismatch! Plugin has: %s\n", testString);
fclose (f);
return FALSE;
}
}
else if (length != 0)
{
printf ("Product string mismatch! Plugin has none.\n", testString);
fclose (f);
return FALSE;
}
fread (&length, sizeof (unsigned), 1, f);
length = htonl (length);
fread (effectName, length, 1, f);
effectName[length] = 0;
printf ("Effect name: %s\n", effectName);
success = vstfx_call_dispatcher(vstfx, effGetEffectName, 0, 0, testString, 0);
if(success == 1)
{
if(strcmp(testString, effectName)!= 0)
{
printf ("Effect name mismatch! Plugin has: %s\n", testString);
fclose (f);
return FALSE;
}
}
else if(length != 0)
{
printf ("Effect name mismatch! Plugin has none.\n", testString);
fclose (f);
return FALSE;
}
fread (&length, sizeof (unsigned), 1, f);
length = htonl (length);
fread (vendorString, length, 1, f);
vendorString[length] = 0;
printf ("Vendor string: %s\n", vendorString);
success = vstfx_call_dispatcher(vstfx, effGetVendorString, 0, 0, testString, 0);
if(success == 1)
{
if (strcmp(testString, vendorString)!= 0)
{
printf ("Vendor string mismatch! Plugin has: %s\n", testString);
fclose (f);
return FALSE;
}
}
else if(length != 0)
{
printf ("Vendor string mismatch! Plugin has none.\n", testString);
fclose (f);
return FALSE;
}
int numParam;
unsigned i;
fread (&numParam, sizeof (int), 1, f);
numParam = htonl (numParam);
for (i = 0; i < numParam; ++i)
{
float val;
fread (&val, sizeof (float), 1, f);
val = htonf (val);
pthread_mutex_lock(&vstfx->lock );
vstfx->plugin->setParameter(vstfx->plugin, i, val);
pthread_mutex_unlock(&vstfx->lock );
}
int bytelen;
fread (&bytelen, sizeof (int), 1, f);
bytelen = htonl (bytelen);
if (bytelen)
{
char * buf = malloc (bytelen);
fread (buf, bytelen, 1, f);
vstfx_call_dispatcher(vstfx, 24, 0, bytelen, buf, 0);
free (buf);
}
}
else
{
printf ("Could not open state file\n");
return FALSE;
}
return TRUE;
}
#endif