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: 0.7.6


ags_port_descriptor_free ()

void
ags_port_descriptor_free (AgsPortDescriptor *port_descriptor);

Free the AgsPortDescriptor

Parameters

port_descriptor

the AgsPortDescriptor

 

Since: 0.7.6


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: 0.7.6


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: 0.7.6


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: 0.7.107


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: 0.7.6


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: 0.7.6


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: 0.7.6


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: 0.7.6


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: 0.7.6


ags_base_plugin_load_plugin ()

void
ags_base_plugin_load_plugin (AgsBasePlugin *base_plugin);

Load the plugin

Parameters

base_plugin

the AgsBasePlugin

 

Since: 0.7.6


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: 0.7.6


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

#define AGS_IS_BASE_PLUGIN_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_BASE_PLUGIN))


ags_base_plugin_get_type ()

GType
ags_base_plugin_get_type (void);

Types and Values

enum AgsBasePluginFlags

Members

AGS_BASE_PLUGIN_IS_INSTRUMENT

   

enum AgsPortDescriptorFlags

Members

AGS_PORT_DESCRIPTOR_ATOM

   

AGS_PORT_DESCRIPTOR_AUDIO

   

AGS_PORT_DESCRIPTOR_CONTROL

   

AGS_PORT_DESCRIPTOR_MIDI

   

AGS_PORT_DESCRIPTOR_EVENT

   

AGS_PORT_DESCRIPTOR_OUTPUT

   

AGS_PORT_DESCRIPTOR_INPUT

   

AGS_PORT_DESCRIPTOR_TOGGLED

   

AGS_PORT_DESCRIPTOR_ENUMERATION

   

AGS_PORT_DESCRIPTOR_LOGARITHMIC

   

AGS_PORT_DESCRIPTOR_INTEGER

   

AGS_PORT_DESCRIPTOR_SAMPLERATE

   

AGS_PORT_DESCRIPTOR_BOUNDED_BELOW

   

AGS_PORT_DESCRIPTOR_BOUNDED_ABOVE

   

AGS_PORT_DESCRIPTOR_UI_NOTIFICATION

   

struct AgsPortDescriptor

struct AgsPortDescriptor {
  guint flags;
  
  guint port_index;

  gchar *port_name;
  gchar *port_symbol;

  guint 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: 0.7.6


The “effect-index” property

  “effect-index”             guint

The assigned effect-index.

Flags: Read / Write

Default value: 0

Since: 0.7.6


The “filename” property

  “filename”                 gchar *

The assigned filename.

Flags: Read / Write

Default value: NULL

Since: 0.7.6


The “ui-effect” property

  “ui-effect”                gchar *

The assigned ui-effect.

Flags: Read / Write

Default value: NULL

Since: 0.7.127


The “ui-effect-index” property

  “ui-effect-index”          guint

The assigned ui-effect-index.

Flags: Read / Write

Default value: 0

Since: 0.7.127


The “ui-filename” property

  “ui-filename”              gchar *

The assigned UI filename.

Flags: Read / Write

Default value: NULL

Since: 0.7.127


The “ui-plugin” property

  “ui-plugin”                AgsBasePlugin *

The assigned ui-plugin.

Flags: Read / Write

Since: 0.7.6

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: 0.7.6


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: 0.7.6


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: 0.7.6


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: 0.7.6


The “load-plugin” signal

void
user_function (AgsBasePlugin *agsbaseplugin,
               gpointer       user_data)

Parameters

agsbaseplugin

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

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: 0.7.6