d2b777f77aee008a7433d8a3565565b79066992f
[ardour.git] / libs / fst / fst.h
1 #ifndef __fst_fst_h__
2 #define __fst_fst_h__
3
4 #include <setjmp.h>
5 #include <signal.h>
6 #include <pthread.h>
7
8 #include "ardour/libardour_visibility.h"
9 #include "ardour/vst_types.h"
10 #include "ardour/vestige/aeffectx.h"
11
12 #include "pbd/libpbd_visibility.h"
13
14
15 /**
16  * Display FST error message.
17  *
18  * Set via fst_set_error_function(), otherwise a FST-provided
19  * default will print @a msg (plus a newline) to stderr.
20  *
21  * @param msg error message text (no newline at end).
22  */
23 LIBARDOUR_API void (*fst_error_callback)(const char *msg);
24
25 /**
26  * Set the @ref fst_error_callback for error message display.
27  *
28  * The FST library provides two built-in callbacks for this purpose:
29  * default_fst_error_callback() and silent_fst_error_callback().
30  */
31 void fst_set_error_function (void (*func)(const char *));
32
33 void  fst_error (const char *fmt, ...);
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 extern int        fst_init (void* possible_hmodule);
40 extern void       fst_exit (void);
41
42 extern VSTHandle* fst_load (const char*);
43 extern int        fst_unload (VSTHandle**);
44
45 extern VSTState * fst_instantiate (VSTHandle *, audioMasterCallback amc, void* userptr);
46 extern void       fst_close (VSTState *);
47
48 //these funcs get called from gtk2_ardour, so need to be visible
49 LIBARDOUR_API int  fst_run_editor (VSTState *, void* window_parent);
50 LIBARDOUR_API void fst_destroy_editor (VSTState *);
51 LIBARDOUR_API void fst_move_window_into_view (VSTState *);
52 //----
53
54 extern void fst_event_loop_remove_plugin (VSTState* fst);
55
56 #ifndef PLATFORM_WINDOWS /* linux + wine */
57 extern void fst_start_threading(void);
58 extern void fst_stop_threading(void);
59 #endif
60
61 extern void fst_audio_master_idle(void);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* __fst_fst_h__ */