diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-07 02:56:11 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-07 02:56:11 +0000 |
commit | 40c162d6096f9bb338b602fb7845234133285411 (patch) | |
tree | 04780c7e06b050191fac93ed778ec330e842361e /libs/fst | |
parent | 25a702798e7fc2f3875208ceb67e0b6a7dfb1715 (diff) |
Move RDF-based preset stuff into LadspaPlugin, to make way for a set of evil hacks to make VST chunk-based presets work (for some values of `work').
May fix #3577.
git-svn-id: svn://localhost/ardour2/branches/3.0@8202 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/fst')
-rw-r--r-- | libs/fst/fst.h | 3 | ||||
-rw-r--r-- | libs/fst/fstinfofile.c | 2 | ||||
-rw-r--r-- | libs/fst/vstwin.c | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/libs/fst/fst.h b/libs/fst/fst.h index 6ef5acf794..28ee49bd01 100644 --- a/libs/fst/fst.h +++ b/libs/fst/fst.h @@ -83,6 +83,9 @@ struct _FST int vst_version; int want_program; + int want_chunk; + unsigned char *wanted_chunk; + int wanted_chunk_size; int current_program; float *want_params; float *set_params; diff --git a/libs/fst/fstinfofile.c b/libs/fst/fstinfofile.c index 2d7fb2fa6a..c7061cd6b8 100644 --- a/libs/fst/fstinfofile.c +++ b/libs/fst/fstinfofile.c @@ -14,6 +14,8 @@ #define FALSE 0 #define TRUE !FALSE +extern char * strdup (const char *); + static char *read_string( FILE *fp ) { char buf[MAX_STRING_LEN]; diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index 09ca8f18d3..847ca19f1a 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -71,6 +71,7 @@ fst_new () pthread_cond_init (&fst->window_status_change, NULL); pthread_cond_init (&fst->plugin_dispatcher_called, NULL); fst->want_program = -1; + fst->want_chunk = 0; fst->current_program = -1; return fst; } @@ -178,6 +179,12 @@ again: /* did it work? */ fst->current_program = fst->plugin->dispatcher (fst->plugin, 3, /* effGetProgram */ 0, 0, NULL, 0); fst->want_program = -1; + printf("old-style leaves CP=%d\n", fst->current_program); + } + + if (fst->want_chunk == 1) { + fst->plugin->dispatcher (fst->plugin, 24 /* effSetChunk */, 1, fst->wanted_chunk_size, fst->wanted_chunk, 0); + fst->want_chunk = 0; } if(fst->dispatcher_wantcall) { |