void PluginAClientLAD::save_data(KeyFrame *keyframe)
{
- FileXML output;
- char string[BCTEXTLEN];
if( !config.port_data ) config.initialize(server);
-
+ FileXML output;
// cause data to be stored directly in text
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
+ char string[BCTEXTLEN];
output.tag.set_title(lad_to_upper(string, plugin_title()));
const LADSPA_Descriptor *lad_desc = server->lad_descriptor;
void PluginAClientLAD::read_data(KeyFrame *keyframe)
{
- FileXML input;
- char string[BCTEXTLEN];
-
- input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
if( !config.port_data ) config.initialize(server);
+ FileXML input;
+ input.set_shared_input(keyframe->xbuf);
while(! input.read_tag() ) {
//printf("PluginAClientLAD::read_data %s\n", input.tag.get_title());
+ char string[BCTEXTLEN];
if(! input.tag.title_is(lad_to_upper(string, plugin_title())) ) continue;
const LADSPA_Descriptor *lad_desc = server->lad_descriptor;
const LADSPA_PortDescriptor *port_desc = lad_desc->PortDescriptors;
}
int MWindow::init_ladspa_index(MWindow *mwindow, Preferences *preferences,
- const char *index_path, const char *plugin_dir)
+ FILE *fp, const char *plugin_dir)
{
char plugin_path[BCTEXTLEN], *path = FileSystem::basepath(plugin_dir);
strcpy(plugin_path, path); delete [] path;
printf("init ladspa index: %s\n", plugin_dir);
- FILE *fp = fopen(index_path,"w");
- if( !fp ) {
- fprintf(stderr,_("MWindow::init_ladspa_index: "
- "can't create plugin index: %s\n"), index_path);
- return 1;
- }
fprintf(fp, "%d\n", PLUGIN_FILE_VERSION);
fprintf(fp, "%s\n", plugin_dir);
init_plugin_index(mwindow, preferences, fp, plugin_path);
- fclose(fp);
return 0;
}