}
}
-static FSTInfo *load_fst_info_file( char *filename ) {
-
- FSTInfo *info = (FSTInfo *) malloc( sizeof( FSTInfo ) );
- FILE *fp;
- int i;
-
-
- if( info == NULL )
- return NULL;
+static VSTInfo *
+load_fst_info_file (char* filename)
+{
+ VSTInfo *info = (VSTInfo *) malloc (sizeof (VSTInfo));
+ FILE *fp;
+ int i;
+
+ if (info == NULL) {
+ return NULL;
+ }
- fp = fopen( filename, "r" );
-
- if( fp == NULL ) {
- free( info );
- return NULL;
- }
+ fp = fopen( filename, "r" );
+
+ if (fp == NULL) {
+ free (info);
+ return NULL;
+ }
if( (info->name = read_string( fp )) == NULL ) goto error;
if( (info->creator = read_string( fp )) == NULL ) goto error;
return NULL;
}
-static int save_fst_info_file( FSTInfo *info, char *filename ) {
-
+static int
+save_fst_info_file (VSTInfo* info, char* filename)
+{
FILE *fp;
int i;
}
static int
-fst_can_midi (FST *fst)
+fst_can_midi (VSTState* fst)
{
AEffect* plugin = fst->plugin;
int vst_version = plugin->dispatcher (plugin, effGetVstVersion, 0, 0, NULL, 0.0f);
return FALSE;
}
-static FSTInfo *
-fst_info_from_plugin (FST* fst)
+static VSTInfo *
+fst_info_from_plugin (VSTState* fst)
{
- FSTInfo* info = (FSTInfo *) malloc( sizeof( FSTInfo ) );
+ VSTInfo* info = (VSTInfo *) malloc (sizeof (VSTInfo));
AEffect* plugin;
int i;
char creator[65];
}
}
-FSTInfo *fst_get_info( char *dllpath ) {
-
- if( fst_info_file_is_valid( dllpath ) ) {
- FSTInfo *info;
- char *fstpath = fst_dllpath_to_infopath( dllpath );
-
- info = load_fst_info_file( fstpath );
- free( fstpath );
- return info;
+VSTInfo *
+fst_get_info (char* dllpath)
+{
+ if( fst_info_file_is_valid( dllpath ) ) {
+ VSTInfo *info;
+ char *fstpath = fst_dllpath_to_infopath( dllpath );
+
+ info = load_fst_info_file( fstpath );
+ free( fstpath );
+ return info;
} else {
- FSTHandle *h;
- FST *fst;
- FSTInfo *info;
- char *fstpath;
+ VSTHandle* h;
+ VSTState* fst;
+ VSTInfo* info;
+ char* fstpath;
if( !(h = fst_load( dllpath )) ) return NULL;
if( !(fst = fst_instantiate( h, simple_master_callback, NULL )) ) {
}
}
-void fst_free_info( FSTInfo *info ) {
-
+void
+fst_free_info (VSTInfo *info)
+{
int i;
for( i=0; i<info->numParams; i++ ) {