mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 18:16:35 +01:00
consolidate VSTState initialization
This commit is contained in:
parent
48c470d51d
commit
8e3b6c9ac6
4 changed files with 20 additions and 48 deletions
|
|
@ -133,6 +133,23 @@ struct LIBARDOUR_API _VSTState
|
||||||
pthread_cond_t plugin_dispatcher_called;
|
pthread_cond_t plugin_dispatcher_called;
|
||||||
pthread_cond_t window_created;
|
pthread_cond_t window_created;
|
||||||
int been_activated;
|
int been_activated;
|
||||||
|
|
||||||
|
void init () {
|
||||||
|
pthread_mutex_init (&lock, 0);
|
||||||
|
pthread_cond_init (&window_status_change, 0);
|
||||||
|
pthread_cond_init (&plugin_dispatcher_called, 0);
|
||||||
|
pthread_cond_init (&window_created, 0);
|
||||||
|
want_program = -1;
|
||||||
|
want_chunk = 0;
|
||||||
|
n_pending_keys = 0;
|
||||||
|
has_editor = 0;
|
||||||
|
program_set_without_editor = 0;
|
||||||
|
linux_window = 0;
|
||||||
|
linux_plugin_ui_window = 0;
|
||||||
|
eventProc = 0;
|
||||||
|
extra_data = 0;
|
||||||
|
want_resize = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _VSTState VSTState;
|
typedef struct _VSTState VSTState;
|
||||||
|
|
|
||||||
|
|
@ -83,27 +83,7 @@ static VSTState *
|
||||||
vstfx_new ()
|
vstfx_new ()
|
||||||
{
|
{
|
||||||
VSTState* vstfx = (VSTState *) calloc (1, sizeof (VSTState));
|
VSTState* vstfx = (VSTState *) calloc (1, sizeof (VSTState));
|
||||||
|
vstfx->init ();
|
||||||
/*Mutexes*/
|
|
||||||
|
|
||||||
pthread_mutex_init (&vstfx->lock, 0);
|
|
||||||
pthread_cond_init (&vstfx->window_status_change, 0);
|
|
||||||
pthread_cond_init (&vstfx->plugin_dispatcher_called, 0);
|
|
||||||
pthread_cond_init (&vstfx->window_created, 0);
|
|
||||||
|
|
||||||
/*Safe values*/
|
|
||||||
|
|
||||||
vstfx->want_program = -1;
|
|
||||||
vstfx->want_chunk = 0;
|
|
||||||
vstfx->n_pending_keys = 0;
|
|
||||||
vstfx->has_editor = 0;
|
|
||||||
vstfx->program_set_without_editor = 0;
|
|
||||||
vstfx->linux_window = 0;
|
|
||||||
vstfx->linux_plugin_ui_window = 0;
|
|
||||||
vstfx->eventProc = 0;
|
|
||||||
vstfx->extra_data = 0;
|
|
||||||
vstfx->want_resize = 0;
|
|
||||||
|
|
||||||
return vstfx;
|
return vstfx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,25 +80,7 @@ static VSTState *
|
||||||
mac_vst_new ()
|
mac_vst_new ()
|
||||||
{
|
{
|
||||||
VSTState* mac_vst = (VSTState *) calloc (1, sizeof (VSTState));
|
VSTState* mac_vst = (VSTState *) calloc (1, sizeof (VSTState));
|
||||||
|
mac_vst0->init();
|
||||||
/*Mutexes*/
|
|
||||||
pthread_mutex_init (&mac_vst->lock, 0);
|
|
||||||
pthread_cond_init (&mac_vst->window_status_change, 0); // XXX unused
|
|
||||||
pthread_cond_init (&mac_vst->plugin_dispatcher_called, 0); // XXX unused
|
|
||||||
pthread_cond_init (&mac_vst->window_created, 0); // XXX unused
|
|
||||||
|
|
||||||
/*Safe values*/
|
|
||||||
mac_vst->want_program = -1;
|
|
||||||
mac_vst->want_chunk = 0;
|
|
||||||
mac_vst->n_pending_keys = 0;
|
|
||||||
mac_vst->has_editor = 0;
|
|
||||||
mac_vst->program_set_without_editor = 0;
|
|
||||||
mac_vst->linux_window = 0;
|
|
||||||
mac_vst->linux_plugin_ui_window = 0;
|
|
||||||
mac_vst->eventProc = 0;
|
|
||||||
mac_vst->extra_data = 0;
|
|
||||||
mac_vst->want_resize = 0;
|
|
||||||
|
|
||||||
return mac_vst;
|
return mac_vst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,13 +218,7 @@ static VSTState*
|
||||||
fst_new (void)
|
fst_new (void)
|
||||||
{
|
{
|
||||||
VSTState* fst = (VSTState*) calloc (1, sizeof (VSTState));
|
VSTState* fst = (VSTState*) calloc (1, sizeof (VSTState));
|
||||||
pthread_mutex_init (&fst->lock, NULL);
|
fst->init();
|
||||||
pthread_cond_init (&fst->window_status_change, NULL); // unused ?? -> TODO check gtk2ardour
|
|
||||||
pthread_cond_init (&fst->plugin_dispatcher_called, NULL); // unused ??
|
|
||||||
fst->want_program = -1;
|
|
||||||
fst->want_chunk = 0;
|
|
||||||
fst->n_pending_keys = 0;
|
|
||||||
fst->has_editor = 0;
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
fst->voffset = 50;
|
fst->voffset = 50;
|
||||||
fst->hoffset = 0;
|
fst->hoffset = 0;
|
||||||
|
|
@ -232,7 +226,6 @@ fst_new (void)
|
||||||
fst->voffset = 24;
|
fst->voffset = 24;
|
||||||
fst->hoffset = 6;
|
fst->hoffset = 6;
|
||||||
#endif
|
#endif
|
||||||
fst->program_set_without_editor = 0;
|
|
||||||
return fst;
|
return fst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue