krähemann.com

AgsPort

AgsPort — Perform thread-safe operations

Stability Level

Stable, unless otherwise indicated

Properties

gpointer automation Read / Write
gchar * control-port Read / Write
AgsConversion * conversion Read / Write
gchar * 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
gchar * specifier Read / Write

Signals

void safe-get-property Run Last
void safe-read Run Last
void safe-set-property Run Last
void safe-write Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── AgsPort

Includes

#include <ags/audio/ags_port.h>

Description

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

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_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

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_ADDED_TO_REGISTRY

add to registry

 

AGS_PORT_CONNECTED

indicates the port was connected by calling AgsConnectable::connect()

 

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

 

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

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

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

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