AgsBasePlugin

AgsBasePlugin — The base plugin class

Stability Level

Stable, unless otherwise indicated

Functions

#define AGS_BASE_PLUGIN_GET_OBJ_MUTEX()
GRecMutex * ags_base_plugin_get_obj_mutex ()
gboolean ags_base_plugin_test_flags ()
void ags_base_plugin_set_flags ()
void ags_base_plugin_unset_flags ()
gchar * ags_base_plugin_get_filename ()
void ags_base_plugin_set_filename ()
gchar * ags_base_plugin_get_effect ()
void ags_base_plugin_set_effect ()
guint ags_base_plugin_get_effect_index ()
void ags_base_plugin_set_effect_index ()
gpointer ags_base_plugin_get_plugin_so ()
void ags_base_plugin_set_plugin_so ()
GList * ags_base_plugin_get_plugin_port ()
void ags_base_plugin_set_plugin_port ()
gchar * ags_base_plugin_get_ui_filename ()
void ags_base_plugin_set_ui_filename ()
gchar * ags_base_plugin_get_ui_effect ()
void ags_base_plugin_set_ui_effect ()
guint ags_base_plugin_get_ui_effect_index ()
void ags_base_plugin_set_ui_effect_index ()
gpointer ags_base_plugin_get_ui_plugin_so ()
void ags_base_plugin_set_ui_plugin_so ()
GObject * ags_base_plugin_get_ui_plugin ()
void ags_base_plugin_set_ui_plugin ()
GList * ags_base_plugin_find_filename ()
GList * ags_base_plugin_find_effect ()
GList * ags_base_plugin_find_ui_effect_index ()
gint ags_base_plugin_sort_func ()
GList * ags_base_plugin_sort ()
void ags_base_plugin_apply_port_group_by_prefix ()
gpointer ags_base_plugin_instantiate ()
gpointer ags_base_plugin_instantiate_with_params ()
void ags_base_plugin_connect_port ()
void ags_base_plugin_activate ()
void ags_base_plugin_deactivate ()
void ags_base_plugin_run ()
void ags_base_plugin_load_plugin ()
AgsBasePlugin * ags_base_plugin_new ()

Properties

char * effect Read / Write
guint effect-index Read / Write
char * filename Read / Write
gpointer plugin-port Read / Write
gpointer plugin-so Read / Write
char * ui-effect Read / Write
guint ui-effect-index Read / Write
char * ui-filename Read / Write
AgsBasePlugin * ui-plugin Read / Write
gpointer ui-plugin-so Read / Write
gpointer uuid Read / Write

Signals

void activate Run Last
void connect-port Run Last
void deactivate Run Last
gpointer instantiate Run Last
gpointer instantiate-with-params Run Last
void load-plugin Run Last
void run Run Last

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsBasePluginFlags
    GObject
    ╰── AgsBasePlugin
        ├── AgsDssiPlugin
        ├── AgsLadspaPlugin
        ├── AgsLv2Plugin
        ╰── AgsLv2uiPlugin

Includes

#include <ags/plugin/ags_base_plugin.h>

Description

The AgsBasePlugin loads/unloads plugins on a abstraction level.

Functions

AGS_BASE_PLUGIN_GET_OBJ_MUTEX()

#define AGS_BASE_PLUGIN_GET_OBJ_MUTEX(obj) (&(((AgsBasePlugin *) obj)->obj_mutex))

ags_base_plugin_get_obj_mutex ()

GRecMutex *
ags_base_plugin_get_obj_mutex (AgsBasePlugin *base_plugin);

Get object mutex.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the GRecMutex to lock base_plugin

Since: 3.1.0


ags_base_plugin_test_flags ()

gboolean
ags_base_plugin_test_flags (AgsBasePlugin *base_plugin,
                            AgsBasePluginFlags flags);

Test flags to be set on recall .

Parameters

base_plugin

the AgsBasePlugin

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_base_plugin_set_flags ()

void
ags_base_plugin_set_flags (AgsBasePlugin *base_plugin,
                           AgsBasePluginFlags flags);

Set flags.

Parameters

base_plugin

the AgsBasePlugin

 

flags

the flags

 

Since: 3.0.0


ags_base_plugin_unset_flags ()

void
ags_base_plugin_unset_flags (AgsBasePlugin *base_plugin,
                             AgsBasePluginFlags flags);

Unset flags.

Parameters

base_plugin

the AgsBasePlugin

 

flags

the flags

 

Since: 3.0.0


ags_base_plugin_get_filename ()

gchar *
ags_base_plugin_get_filename (AgsBasePlugin *base_plugin);

Get filename.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the filename

Since: 3.1.0


ags_base_plugin_set_filename ()

void
ags_base_plugin_set_filename (AgsBasePlugin *base_plugin,
                              gchar *filename);

Set filename.

Parameters

base_plugin

the AgsBasePlugin

 

filename

the filename

 

Since: 3.1.0


ags_base_plugin_get_effect ()

gchar *
ags_base_plugin_get_effect (AgsBasePlugin *base_plugin);

Get effect.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the effect

Since: 3.1.0


ags_base_plugin_set_effect ()

void
ags_base_plugin_set_effect (AgsBasePlugin *base_plugin,
                            gchar *effect);

Set effect.

Parameters

base_plugin

the AgsBasePlugin

 

effect

the effect

 

Since: 3.1.0


ags_base_plugin_get_effect_index ()

guint
ags_base_plugin_get_effect_index (AgsBasePlugin *base_plugin);

Get effect index.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the effect index

Since: 3.1.0


ags_base_plugin_set_effect_index ()

void
ags_base_plugin_set_effect_index (AgsBasePlugin *base_plugin,
                                  guint effect_index);

Set effect index.

Parameters

base_plugin

the AgsBasePlugin

 

effect_index

the effect index

 

Since: 3.1.0


ags_base_plugin_get_plugin_so ()

gpointer
ags_base_plugin_get_plugin_so (AgsBasePlugin *base_plugin);

Get plugin so.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the plugin so

Since: 3.1.0


ags_base_plugin_set_plugin_so ()

void
ags_base_plugin_set_plugin_so (AgsBasePlugin *base_plugin,
                               gpointer plugin_so);

Set plugin_so.

Parameters

base_plugin

the AgsBasePlugin

 

plugin_so

the plugin so

 

Since: 3.1.0


ags_base_plugin_get_plugin_port ()

GList *
ags_base_plugin_get_plugin_port (AgsBasePlugin *base_plugin);

ags_base_plugin_set_plugin_port ()

void
ags_base_plugin_set_plugin_port (AgsBasePlugin *base_plugin,
                                 GList *plugin_port);

Set recall dependency by replacing existing.

Parameters

base_plugin

the AgsBasePlugin

 

plugin_port

the GList containing AgsPluginPort.

[element-type AgsAudio.PluginPort][transfer full]

Since: 3.1.0


ags_base_plugin_get_ui_filename ()

gchar *
ags_base_plugin_get_ui_filename (AgsBasePlugin *base_plugin);

Get UI filename.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the UI filename

Since: 3.1.0


ags_base_plugin_set_ui_filename ()

void
ags_base_plugin_set_ui_filename (AgsBasePlugin *base_plugin,
                                 gchar *ui_filename);

Set UI filename.

Parameters

base_plugin

the AgsBasePlugin

 

ui_filename

the UI filename

 

Since: 3.1.0


ags_base_plugin_get_ui_effect ()

gchar *
ags_base_plugin_get_ui_effect (AgsBasePlugin *base_plugin);

Get UI effect.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the UI effect

Since: 3.1.0


ags_base_plugin_set_ui_effect ()

void
ags_base_plugin_set_ui_effect (AgsBasePlugin *base_plugin,
                               gchar *ui_effect);

Set UI effect.

Parameters

base_plugin

the AgsBasePlugin

 

ui_effect

the UI effect

 

Since: 3.1.0


ags_base_plugin_get_ui_effect_index ()

guint
ags_base_plugin_get_ui_effect_index (AgsBasePlugin *base_plugin);

Get UI effect index.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the UI effect index

Since: 3.1.0


ags_base_plugin_set_ui_effect_index ()

void
ags_base_plugin_set_ui_effect_index (AgsBasePlugin *base_plugin,
                                     guint ui_effect_index);

Set UI effect index.

Parameters

base_plugin

the AgsBasePlugin

 

ui_effect_index

the UI effect index

 

Since: 3.1.0


ags_base_plugin_get_ui_plugin_so ()

gpointer
ags_base_plugin_get_ui_plugin_so (AgsBasePlugin *base_plugin);

Get plugin so.

Parameters

base_plugin

the AgsBasePlugin

 

Returns

the plugin so

Since: 3.1.0


ags_base_plugin_set_ui_plugin_so ()

void
ags_base_plugin_set_ui_plugin_so (AgsBasePlugin *base_plugin,
                                  gpointer ui_plugin_so);

Set ui_plugin_so.

Parameters

base_plugin

the AgsBasePlugin

 

ui_plugin_so

the plugin so

 

Since: 3.1.0


ags_base_plugin_get_ui_plugin ()

GObject *
ags_base_plugin_get_ui_plugin (AgsBasePlugin *base_plugin);

ags_base_plugin_set_ui_plugin ()

void
ags_base_plugin_set_ui_plugin (AgsBasePlugin *base_plugin,
                               GObject *ui_plugin);

ags_base_plugin_find_filename ()

GList *
ags_base_plugin_find_filename (GList *base_plugin,
                               gchar *filename);

Find filename in base_plugin GList of AgsBasePlugin.

Parameters

base_plugin

the GList containing AgsBasePlugin.

[element-type AgsAudio.BasePlugin]

filename

the filename as string

 

Returns

the next matching GList.

[element-type AgsAudio.BasePlugin][transfer none]

Since: 3.0.0


ags_base_plugin_find_effect ()

GList *
ags_base_plugin_find_effect (GList *base_plugin,
                             gchar *filename,
                             gchar *effect);

Find filename and effect in base_plugin GList of AgsBasePlugin.

Parameters

base_plugin

the GList containing AgsBasePlugin.

[element-type AgsAudio.BasePlugin]

filename

the filename as string

 

effect

the effect as string

 

Returns

the next matching GList.

[element-type AgsAudio.BasePlugin][transfer none]

Since: 3.0.0


ags_base_plugin_find_ui_effect_index ()

GList *
ags_base_plugin_find_ui_effect_index (GList *base_plugin,
                                      gchar *ui_filename,
                                      guint ui_effect_index);

Find ui_filename and ui_effect_index in base_plugin GList of AgsBasePlugin.

Parameters

base_plugin

the GList containing AgsBasePlugin.

[element-type AgsAudio.BasePlugin]

ui_filename

the UI filename as string

 

ui_effect_index

the UI effect index

 

Returns

the next matching GList.

[element-type AgsAudio.BasePlugin][transfer none]

Since: 3.0.0


ags_base_plugin_sort_func ()

gint
ags_base_plugin_sort_func (gpointer a,
                           gpointer b);

Sort function.

Parameters

a

a AgsBasePlugin

 

b

an other AgsBasePlugin

 

Returns

a value smaller to, equal to or greater to 0 like strcmp

Since: 3.0.0


ags_base_plugin_sort ()

GList *
ags_base_plugin_sort (GList *base_plugin);

Sort base_plugin alphabetically.

Parameters

base_plugin

the GList containing AgsBasePlugin.

[element-type AgsAudio.BasePlugin][transfer none]

Returns

the sorted GList.

[element-type AgsAudio.BasePlugin][transfer none]

Since: 3.0.0


ags_base_plugin_apply_port_group_by_prefix ()

void
ags_base_plugin_apply_port_group_by_prefix
                               (AgsBasePlugin *base_plugin);

ags_base_plugin_instantiate ()

gpointer
ags_base_plugin_instantiate (AgsBasePlugin *base_plugin,
                             guint samplerate,
                             guint buffer_size);

Instantiate the plugin

Parameters

base_plugin

the AgsBasePlugin

 

samplerate

the samplerate

 

buffer_size

the fixed buffer size

 

Returns

the new plugin instance handle

Since: 3.0.0


ags_base_plugin_instantiate_with_params ()

gpointer
ags_base_plugin_instantiate_with_params
                               (AgsBasePlugin *base_plugin,
                                guint *n_params,
                                gchar ***parameter_name,
                                GValue **value);

Instantiate the plugin

Parameters

base_plugin

the AgsBasePlugin

 

n_params

guint pointer to parameter count

 

parameter_name

string vector containing parameter names

 

value

the GValue array

 

Returns

the new plugin instance handle

Since: 3.0.0


ags_base_plugin_connect_port ()

void
ags_base_plugin_connect_port (AgsBasePlugin *base_plugin,
                              gpointer plugin_handle,
                              guint port_index,
                              gpointer data_location);

Connect a plugin instance.

Parameters

base_plugin

the AgsBasePlugin

 

plugin_handle

the plugin instance handle

 

port_index

the port's index to connect

 

data_location

the data location to connect

 

Since: 3.0.0


ags_base_plugin_activate ()

void
ags_base_plugin_activate (AgsBasePlugin *base_plugin,
                          gpointer plugin_handle);

Activate a plugin instance

Parameters

base_plugin

the AgsBasePlugin

 

plugin_handle

the plugin instance handle

 

Since: 3.0.0


ags_base_plugin_deactivate ()

void
ags_base_plugin_deactivate (AgsBasePlugin *base_plugin,
                            gpointer plugin_handle);

Deactivat a plugin instance

Parameters

base_plugin

the AgsBasePlugin

 

plugin_handle

the plugin instance handle

 

Since: 3.0.0


ags_base_plugin_run ()

void
ags_base_plugin_run (AgsBasePlugin *base_plugin,
                     gpointer plugin_handle,
                     snd_seq_event_t *seq_event,
                     guint frame_count);

Deactivat a plugin instance

Parameters

base_plugin

the AgsBasePlugin

 

plugin_handle

the plugin instance handle

 

seq_event

the alsa sequencer events.

[type gpointer][transfer none]

frame_count

the frame counts

 

Since: 3.0.0


ags_base_plugin_load_plugin ()

void
ags_base_plugin_load_plugin (AgsBasePlugin *base_plugin);

Load the plugin

Parameters

base_plugin

the AgsBasePlugin

 

Since: 3.0.0


ags_base_plugin_new ()

AgsBasePlugin *
ags_base_plugin_new (gchar *filename,
                     gchar *effect,
                     guint effect_index);

Creates an AgsBasePlugin

Parameters

filename

the plugin .so

 

effect

the effect's string representation

 

effect_index

the effect's index

 

Returns

a new AgsBasePlugin

Since: 3.0.0

Types and Values

enum AgsBasePluginFlags

Enum values to control the behavior or indicate internal state of AgsBasePlugin by enable/disable as flags.

Members

AGS_BASE_PLUGIN_IS_INSTRUMENT

plugin is instrument

 

Property Details

The “effect” property

  “effect”                   char *

The assigned effect.

Owner: AgsBasePlugin

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “effect-index” property

  “effect-index”             guint

The assigned effect-index.

Owner: AgsBasePlugin

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “filename” property

  “filename”                 char *

The assigned filename.

Owner: AgsBasePlugin

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “plugin-port” property

  “plugin-port”              gpointer

The assigned GList containing AgsPluginPort

[transfer full]

Owner: AgsBasePlugin

Flags: Read / Write

Since: 3.0.0


The “plugin-so” property

  “plugin-so”                gpointer

The assigned plugin.so

Owner: AgsBasePlugin

Flags: Read / Write

Since: 3.0.0


The “ui-effect” property

  “ui-effect”                char *

The assigned ui-effect.

Owner: AgsBasePlugin

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “ui-effect-index” property

  “ui-effect-index”          guint

The assigned ui-effect-index.

Owner: AgsBasePlugin

Flags: Read / Write

Default value: 0

Since: 3.0.0


The “ui-filename” property

  “ui-filename”              char *

The assigned UI filename.

Owner: AgsBasePlugin

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “ui-plugin” property

  “ui-plugin”                AgsBasePlugin *

The assigned ui-plugin.

Owner: AgsBasePlugin

Flags: Read / Write

Since: 3.0.0


The “ui-plugin-so” property

  “ui-plugin-so”             gpointer

The assigned ui_plugin.so

Owner: AgsBasePlugin

Flags: Read / Write

Since: 3.0.0


The “uuid” property

  “uuid”                     gpointer

The assigned AgsUUID

Owner: AgsBasePlugin

Flags: Read / Write

Since: 3.0.0

Signal Details

The “activate” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       plugin_handle,
               gpointer       user_data)

The ::activate signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to activate

 

plugin_handle

the plugin handle

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “connect-port” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       plugin_handle,
               guint          port_index,
               gpointer       data_location,
               gpointer       user_data)

The ::connect-port signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to connect-port

 

plugin_handle

the plugin handle

 

port_index

the port index

 

data_location

the data location

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “deactivate” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       plugin_handle,
               gpointer       user_data)

The ::deactivate signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to deactivate

 

plugin_handle

the plugin handle

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “instantiate” signal

gpointer
user_function (AgsBasePlugin *base_plugin,
               guint          samplerate,
               guint          buffer_size,
               gpointer       user_data)

The ::instantiate signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to instantiate

 

samplerate

the samplerate

 

buffer_size

the fixed buffer size

 

user_data

user data set when the signal handler was connected.

 

Returns

the new plugin instance

Flags: Run Last

Since: 3.0.0


The “instantiate-with-params” signal

gpointer
user_function (AgsBasePlugin *base_plugin,
               gpointer       n_params,
               gpointer       parameter_name,
               gpointer       value,
               gpointer       user_data)

The ::instantiate-with-params signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to instantiate

 

n_params

pointer to array length

 

parameter_name

parameter name string vector

 

value

the GValue array

 

user_data

user data set when the signal handler was connected.

 

Returns

the new plugin instance

Flags: Run Last

Since: 3.0.0


The “load-plugin” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       user_data)

The ::load-plugin signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to load_plugin

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “run” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       plugin_handle,
               gpointer       seq_event,
               guint          frame_count,
               gpointer       user_data)

The ::run signal creates a new instance of plugin.

Parameters

base_plugin

the plugin to run

 

plugin_handle

the plugin handle

 

seq_event

the MIDI data

 

frame_count

the frame count

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0