AgsBasePlugin

AgsBasePlugin — The base plugin class

Functions

Properties

gchar * effect Read / Write
guint effect-index Read / Write
gchar * filename Read / Write
gchar * ui-effect Read / Write
guint ui-effect-index Read / Write
gchar * ui-filename Read / Write
AgsBasePlugin * ui-plugin Read / Write

Signals

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

#define AGS_PORT_DESCRIPTOR(ptr) ((AgsPortDescriptor *)(ptr))

ags_port_descriptor_alloc ()

AgsPortDescriptor *
ags_port_descriptor_alloc ();

Alloc the AgsPortDescriptor

Returns

the AgsPortDescriptor

Since: 1.0.0


ags_port_descriptor_free ()

void
ags_port_descriptor_free (AgsPortDescriptor *port_descriptor);

Free the AgsPortDescriptor

Parameters

port_descriptor

the AgsPortDescriptor

 

Since: 1.0.0


ags_port_descriptor_find_symbol ()

GList *
ags_port_descriptor_find_symbol (GList *port_descriptor,
                                 gchar *port_symbol);

Find port_symbol within port_descriptor .

Parameters

port_descriptor

the GList containing AgsPortDescriptor

 

port_symbol

the port symbol

 

Returns

the matching GList containing AgsPortDescriptor

Since: 1.0.0.8


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

 

filename

the filename as string

 

Returns

the next matching GList

Since: 1.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

 

filename

the filename as string

 

effect

the effect as string

 

Returns

the next matching GList

Since: 1.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

 

ui_filename

the UI filename as string

 

ui_effect_index

the UI effect index

 

Returns

the next matching GList

Since: 1.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

 

Returns

the sorted GList

Since: 1.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);

Instantiate the plugin

Parameters

base_plugin

the AgsBasePlugin

 

samplerate

the samplerate

 

Returns

the new plugin instance handle

Since: 1.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: 1.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: 1.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: 1.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

 

frame_count

the frame counts

 

Since: 1.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: 1.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: 1.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

 

enum AgsPortDescriptorFlags

Common port attributes.

Members

AGS_PORT_DESCRIPTOR_ATOM

atom port

 

AGS_PORT_DESCRIPTOR_AUDIO

audio port

 

AGS_PORT_DESCRIPTOR_CONTROL

control port

 

AGS_PORT_DESCRIPTOR_MIDI

MIDI port

 

AGS_PORT_DESCRIPTOR_EVENT

event port

 

AGS_PORT_DESCRIPTOR_OUTPUT

is output

 

AGS_PORT_DESCRIPTOR_INPUT

is input

 

AGS_PORT_DESCRIPTOR_TOGGLED

toggle control

 

AGS_PORT_DESCRIPTOR_ENUMERATION

enumerated

 

AGS_PORT_DESCRIPTOR_LOGARITHMIC

logarithmic

 

AGS_PORT_DESCRIPTOR_INTEGER

integer

 

AGS_PORT_DESCRIPTOR_SAMPLERATE

samplerate

 

AGS_PORT_DESCRIPTOR_BOUNDED_BELOW

bounded below

 

AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE

bounded above

 

AGS_PORT_DESCRIPTOR_UI_NOTIFICATION

ui notification

 

struct AgsPortDescriptor

struct AgsPortDescriptor {
  guint flags;
  
  guint port_index;

  gchar *port_name;
  gchar *port_symbol;

  gint scale_steps;
  gchar **scale_points;
  float *scale_value;
  
  GValue *lower_value;
  GValue *upper_value;

  GValue *default_value;  
  
  gpointer user_data;
};

AGS_TYPE_BASE_PLUGIN

#define AGS_TYPE_BASE_PLUGIN                (ags_base_plugin_get_type())

struct AgsBasePlugin

struct AgsBasePlugin;

struct AgsBasePluginClass

struct AgsBasePluginClass {
  GObjectClass object;

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

  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.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “effect-index” property

  “effect-index”             guint

The assigned effect-index.

Flags: Read / Write

Default value: 0

Since: 1.0.0


The “filename” property

  “filename”                 gchar *

The assigned filename.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “ui-effect” property

  “ui-effect”                gchar *

The assigned ui-effect.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “ui-effect-index” property

  “ui-effect-index”          guint

The assigned ui-effect-index.

Flags: Read / Write

Default value: 0

Since: 1.0.0


The “ui-filename” property

  “ui-filename”              gchar *

The assigned UI filename.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “ui-plugin” property

  “ui-plugin”                AgsBasePlugin *

The assigned ui-plugin.

Flags: Read / Write

Since: 1.0.0

Signal Details

The “activate” signal

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

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

Parameters

base_plugin

the plugin to activate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “connect-port” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       arg1,
               guint          arg2,
               gpointer       arg3,
               gpointer       user_data)

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

Parameters

base_plugin

the plugin to connect-port

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “deactivate” signal

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

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

Parameters

base_plugin

the plugin to deactivate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “instantiate” signal

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

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

Parameters

base_plugin

the plugin to instantiate

 

samplerate

the samplerate

 

user_data

user data set when the signal handler was connected.

 

Returns

the new plugin instance

Flags: Run Last

Since: 1.0.0


The “load-plugin” signal

void
user_function (AgsBasePlugin *agsbaseplugin,
               gpointer       user_data)

Flags: Run Last


The “run” signal

void
user_function (AgsBasePlugin *base_plugin,
               gpointer       arg1,
               gpointer       arg2,
               guint          arg3,
               gpointer       user_data)

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

Parameters

base_plugin

the plugin to run

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0