krähemann.com

AgsBasePlugin

AgsBasePlugin — The base plugin class

Properties

gchar * effect Read / Write
guint effect-index Read / Write
gchar * filename Read / Write
gpointer plugin-port Read / Write
gpointer plugin-so Read / Write
gchar * ui-effect Read / Write
guint ui-effect-index Read / Write
gchar * 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

    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_test_flags ()

gboolean
ags_base_plugin_test_flags (AgsBasePlugin *base_plugin,
                            guint 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,
                           guint 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,
                             guint flags);

Unset flags.

Parameters

base_plugin

the AgsBasePlugin

 

flags

the flags

 

Since: 3.0.0


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


AGS_BASE_PLUGIN()

#define AGS_BASE_PLUGIN(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_BASE_PLUGIN, AgsBasePlugin))

AGS_BASE_PLUGIN_CLASS()

#define AGS_BASE_PLUGIN_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_BASE_PLUGIN, AgsBasePluginClass))

AGS_BASE_PLUGIN_GET_CLASS()

#define AGS_BASE_PLUGIN_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_BASE_PLUGIN, AgsBasePluginClass))

AGS_IS_BASE_PLUGIN()

#define AGS_IS_BASE_PLUGIN(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_BASE_PLUGIN))

ags_base_plugin_get_type ()

GType
ags_base_plugin_get_type (void);

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

 

AGS_TYPE_BASE_PLUGIN

#define AGS_TYPE_BASE_PLUGIN                (ags_base_plugin_get_type())

struct AgsBasePlugin

struct AgsBasePlugin;

struct AgsBasePluginClass

struct AgsBasePluginClass {
  GObjectClass gobject;

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

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

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

  void (*activate)(AgsBasePlugin *base_plugin, gpointer plugin_handle);
  void (*deactivate)(AgsBasePlugin *base_plugin, gpointer plugin_handle);

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

  void (*load_plugin)(AgsBasePlugin *base_plugin);
};

Property Details

The “effect” property

  “effect”                   gchar *

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”                 gchar *

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”                gchar *

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”              gchar *

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