summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-23 19:30:01 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-23 19:30:01 +0000
commit45cc96f9d10d670d56d8ff0b74a753251ac5ff22 (patch)
tree7feebe85535171a2df1f72b40a644c58cf8d5a1a
parent9040712ab9a050d0f52eeb5a1c91f7e30cb662a3 (diff)
Remove unused code.
git-svn-id: svn://localhost/ardour2/branches/3.0@10806 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rwxr-xr-xgtk2_ardour/vstfxwin.cc139
1 files changed, 0 insertions, 139 deletions
diff --git a/gtk2_ardour/vstfxwin.cc b/gtk2_ardour/vstfxwin.cc
index 1831237db5..6982be3021 100755
--- a/gtk2_ardour/vstfxwin.cc
+++ b/gtk2_ardour/vstfxwin.cc
@@ -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
-