AgsPort

AgsPort — Perform thread-safe operations

Stability Level

Stable, unless otherwise indicated

Functions

Properties

gpointer automation Read / Write
char * control-port Read / Write
AgsConversion * conversion Read / Write
char * plugin-name Read / Write
AgsPluginPort * plugin-port Read / Write
gboolean port-value-is-pointer Read / Write
guint port-value-length Read / Write
guint port-value-size Read / Write
GType * port-value-type Read / Write
char * specifier Read / Write

Signals

Types and Values

enum AgsPortFlags
#define AGS_TYPE_PORT
struct AgsPort
struct AgsPortClass

Object Hierarchy

    GFlags
    ╰── AgsPortFlags
    GObject
    ╰── AgsPort

Implemented Interfaces

AgsPort implements AgsConnectable.

Includes

#include <ags/audio/ags_port.h>

Description

AgsPort provides a thread-safe way to access or change values or properties.

The specifier property has to be unique within context.

You call ags_port_safe_write() to alter a value or ags_port_safe_read() to read a port.

Functions

AGS_PORT_GET_OBJ_MUTEX()

#define AGS_PORT_GET_OBJ_MUTEX(obj) (&(((AgsPort *) obj)->obj_mutex))

ags_port_test_flags ()

gboolean
ags_port_test_flags (AgsPort *port,
                     guint flags);

Test flags to be set on port .

Parameters

port

the AgsPort

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_port_set_flags ()

void
ags_port_set_flags (AgsPort *port,
                    guint flags);

Set flags.

Parameters

port

the AgsPort

 

flags

the flags

 

Since: 3.0.0


ags_port_unset_flags ()

void
ags_port_unset_flags (AgsPort *port,
                      guint flags);

Unset flags.

Parameters

port

the AgsPort

 

flags

the flags

 

Since: 3.0.0


ags_port_safe_read ()

void
ags_port_safe_read (AgsPort *port,
                    GValue *value);

Perform safe read.

Parameters

port

an AgsPort

 

value

the GValue to store result

 

Since: 3.0.0


ags_port_safe_read_raw ()

void
ags_port_safe_read_raw (AgsPort *port,
                        GValue *value);

Perform safe read.

Parameters

port

an AgsPort

 

value

the GValue to store result

 

Since: 3.0.0


ags_port_safe_write ()

void
ags_port_safe_write (AgsPort *port,
                     GValue *value);

Perform safe write.

Parameters

port

an AgsPort

 

value

the GValue containing data

 

Since: 3.0.0


ags_port_safe_write_raw ()

void
ags_port_safe_write_raw (AgsPort *port,
                         GValue *value);

ags_port_safe_get_property ()

void
ags_port_safe_get_property (AgsPort *port,
                            gchar *property_name,
                            GValue *value);

Perform safe get property.

Parameters

port

an AgsPort

 

property_name

the property's name

 

value

the GValue to store the result

 

Since: 3.0.0


ags_port_safe_set_property ()

void
ags_port_safe_set_property (AgsPort *port,
                            gchar *property_name,
                            GValue *value);

Perform safe set property.

Parameters

port

an AgsPort

 

property_name

the property's name

 

value

the GValue containing data

 

Since: 3.0.0


ags_port_find_specifier ()

GList *
ags_port_find_specifier (GList *port,
                         gchar *specifier);

Retrieve port by specifier.

Parameters

port

the GList containing AgsPort.

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

specifier

the recall specifier to match

 

Returns

Next matching GList or NULL.

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

Since: 3.0.0


ags_port_find_plugin_port ()

GList *
ags_port_find_plugin_port (GList *port,
                           GObject *plugin_port);

Retrieve port by plugin port.

Parameters

port

the GList containing AgsPort.

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

plugin_port

the AgsPluginPort

 

Returns

Next matching GList or NULL.

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

Since: 3.11.4


ags_port_add_automation ()

void
ags_port_add_automation (AgsPort *port,
                         GObject *automation);

Adds an automation.

Parameters

port

the AgsPort

 

automation

the AgsAutomation

 

Since: 3.0.0


ags_port_remove_automation ()

void
ags_port_remove_automation (AgsPort *port,
                            GObject *automation);

Removes an automation.

Parameters

port

the AgsPort

 

automation

the AgsAutomation

 

Since: 3.0.0


ags_port_new ()

AgsPort *
ags_port_new ();

Creates an AgsPort.

Returns

a new AgsPort.

Since: 3.0.0


AGS_IS_PORT()

#define AGS_IS_PORT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PORT))

AGS_IS_PORT_CLASS()

#define AGS_IS_PORT_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE((class), AGS_TYPE_PORT))

AGS_PORT()

#define AGS_PORT(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PORT, AgsPort))

AGS_PORT_CLASS()

#define AGS_PORT_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_PORT, AgsPortClass))

AGS_PORT_GET_CLASS()

#define AGS_PORT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_PORT, AgsPortClass))

ags_port_flags_get_type ()

GType
ags_port_flags_get_type ();

ags_port_get_type ()

GType
ags_port_get_type ();

Types and Values

enum AgsPortFlags

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

Members

AGS_PORT_CONVERT_ALWAYS

convert always

 

AGS_PORT_USE_LADSPA_FLOAT

use ladspa float

 

AGS_PORT_IS_OUTPUT

is output

 

AGS_PORT_INFINITE_RANGE

infinite range

 

AGS_TYPE_PORT

#define AGS_TYPE_PORT                (ags_port_get_type())

struct AgsPort

struct AgsPort;

struct AgsPortClass

struct AgsPortClass {
  GObjectClass gobject;

  void (*safe_read)(AgsPort *port, GValue *value);
  void (*safe_write)(AgsPort *port, GValue *value);

  void (*safe_get_property)(AgsPort *port, gchar *property_name, GValue *value);
  void (*safe_set_property)(AgsPort *port, gchar *property_name, GValue *value);
};

Property Details

The “automation” property

  “automation”               gpointer

The port's automation.

[transfer full]

Owner: AgsPort

Flags: Read / Write

Since: 3.0.0


The “control-port” property

  “control-port”             char *

The assigned plugin control port.

Owner: AgsPort

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “conversion” property

  “conversion”               AgsConversion *

The port's conversion object.

Owner: AgsPort

Flags: Read / Write

Since: 3.0.0


The “plugin-name” property

  “plugin-name”              char *

The assigned plugin.

Owner: AgsPort

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “plugin-port” property

  “plugin-port”              AgsPluginPort *

The plugin-port.

Owner: AgsPort

Flags: Read / Write

Since: 3.0.0


The “port-value-is-pointer” property

  “port-value-is-pointer”    gboolean

Specify port data as pointer.

Owner: AgsPort

Flags: Read / Write

Default value: FALSE

Since: 3.0.0


The “port-value-length” property

  “port-value-length”        guint

The port's data array length.

Owner: AgsPort

Flags: Read / Write

Default value: 1

Since: 3.0.0


The “port-value-size” property

  “port-value-size”          guint

The port's data type size.

Owner: AgsPort

Flags: Read / Write

Allowed values: [1,16]

Default value: 8

Since: 3.0.0


The “port-value-type” property

  “port-value-type”          GType *

The port's data type.

Owner: AgsPort

Flags: Read / Write

Allowed values: void

Since: 3.0.0


The “specifier” property

  “specifier”                char *

The assigned plugin identifier.

Owner: AgsPort

Flags: Read / Write

Default value: NULL

Since: 3.0.0

Signal Details

The “safe-get-property” signal

void
user_function (AgsPort *port,
               char    *property_name,
               gpointer value,
               gpointer user_data)

The ::safe-get-property signal is emited while safe get property.

Parameters

port

the object providing safe get property

 

property_name

the property name

 

value

the GValue

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “safe-read” signal

void
user_function (AgsPort *port,
               gpointer value,
               gpointer user_data)

The ::safe-read signal is emited while doing safe read operation.

Parameters

port

the object providing safe read

 

value

the GValue

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “safe-set-property” signal

void
user_function (AgsPort *port,
               char    *property_name,
               gpointer value,
               gpointer user_data)

The ::safe-set-property signal is emited while safe set property.

Parameters

port

the object providing safe set property

 

property_name

the property name

 

value

the GValue

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “safe-write” signal

void
user_function (AgsPort *port,
               gpointer value,
               gpointer user_data)

The ::safe-write signal is emited while doing safe write operation.

Parameters

port

the object providing safe write

 

value

the GValue

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0