krähemann.com

AgsOscMeterController

AgsOscMeterController — OSC meter controller

Stability Level

Stable, unless otherwise indicated

Signals

gpointer monitor-meter Run Last
void start-monitor Run Last
void stop-monitor Run Last

Object Hierarchy

    GObject
    ╰── AgsOscController
        ╰── AgsOscMeterController

Includes

#include <ags/audio/osc/controller/ags_osc_meter_controller.h>

Description

The AgsOscMeterController is a base object to implement osc_meter_controllers.

Functions

AGS_OSC_METER_CONTROLLER_MONITOR()

#define AGS_OSC_METER_CONTROLLER_MONITOR(ptr) ((AgsOscMeterControllerMonitor *)(ptr))

ags_osc_meter_controller_test_flags ()

gboolean
ags_osc_meter_controller_test_flags (AgsOscMeterController *osc_meter_controller,
                                     AgsOscMeterControllerFlags flags);

Test flags to be set on osc_meter_controller .

Parameters

osc_meter_controller

the AgsOscMeterController

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_osc_meter_controller_set_flags ()

void
ags_osc_meter_controller_set_flags (AgsOscMeterController *osc_meter_controller,
                                    AgsOscMeterControllerFlags flags);

Set flags.

Parameters

osc_meter_controller

the AgsOscMeterController

 

flags

the flags

 

Since: 3.0.0


ags_osc_meter_controller_unset_flags ()

void
ags_osc_meter_controller_unset_flags (AgsOscMeterController *osc_meter_controller,
                                      AgsOscMeterControllerFlags flags);

Unset flags.

Parameters

osc_meter_controller

the AgsOscMeterController

 

flags

the flags

 

Since: 3.0.0


ags_osc_meter_controller_monitor_alloc ()

AgsOscMeterControllerMonitor *
ags_osc_meter_controller_monitor_alloc
                               ();

Allocate AgsOscMeterControllerMonitor.

Returns

the newly allocate AgsOscMeterControllerMonitor.

[type gpointer][transfer none]

Since: 3.0.0


ags_osc_meter_controller_monitor_free ()

void
ags_osc_meter_controller_monitor_free (AgsOscMeterControllerMonitor *monitor);

Free monitor .

Parameters

monitor

the AgsOscMeterControllerMonitor.

[type gpointer][transfer none]

Since: 3.0.0


ags_osc_meter_controller_monitor_ref ()

void
ags_osc_meter_controller_monitor_ref (AgsOscMeterControllerMonitor *monitor);

Increase reference count of monitor .

Parameters

monitor

the AgsOscMeterControllerMonitor.

[type gpointer][transfer none]

Since: 3.0.0


ags_osc_meter_controller_monitor_unref ()

void
ags_osc_meter_controller_monitor_unref
                               (AgsOscMeterControllerMonitor *monitor);

Decrease reference count of monitor . If ref count is less or equal 0 monitor is freed.

Parameters

monitor

the AgsOscMeterControllerMonitor.

[type gpointer][transfer none]

Since: 3.0.0


ags_osc_meter_controller_monitor_find_path ()

GList *
ags_osc_meter_controller_monitor_find_path
                               (GList *monitor,
                                gchar *path);

Find path in monitor .

Parameters

monitor

the GList containing AgsOscMeterControllerMonitor.

[element-type gpointer][transfer none]

path

the path as string

 

Returns

the next matching GList containing AgsOscMeterControllerMonitor.

[element-type gpointer][transfer none]

Since: 3.0.0


ags_osc_meter_controller_monitor_find_port ()

GList *
ags_osc_meter_controller_monitor_find_port
                               (GList *monitor,
                                AgsPort *port);

Find port in monitor .

Parameters

monitor

the GList containing AgsOscMeterControllerMonitor.

[element-type gpointer][transfer none]

port

the AgsPort

 

Returns

the next matching GList containing AgsOscMeterControllerMonitor.

[element-type gpointer][transfer none]

Since: 3.0.0


ags_osc_meter_controller_add_monitor ()

void
ags_osc_meter_controller_add_monitor (AgsOscMeterController *osc_meter_controller,
                                      AgsOscMeterControllerMonitor *monitor);

ags_osc_meter_controller_remove_monitor ()

void
ags_osc_meter_controller_remove_monitor
                               (AgsOscMeterController *osc_meter_controller,
                                AgsOscMeterControllerMonitor *monitor);

ags_osc_meter_controller_contains_monitor ()

gboolean
ags_osc_meter_controller_contains_monitor
                               (AgsOscMeterController *osc_meter_controller,
                                AgsOscConnection *osc_connection,
                                AgsPort *port);

ags_osc_meter_controller_start_monitor ()

void
ags_osc_meter_controller_start_monitor
                               (AgsOscMeterController *osc_meter_controller);

Start monitoring.

Parameters

osc_meter_controller

the AgsOscMeterController

 

Since: 3.0.0


ags_osc_meter_controller_stop_monitor ()

void
ags_osc_meter_controller_stop_monitor (AgsOscMeterController *osc_meter_controller);

Stop monitoring.

Parameters

osc_meter_controller

the AgsOscMeterController

 

Since: 3.0.0


ags_osc_meter_controller_monitor_meter ()

gpointer
ags_osc_meter_controller_monitor_meter
                               (AgsOscMeterController *osc_meter_controller,
                                AgsOscConnection *osc_connection,
                                guchar *message,
                                guint message_size);

Get meter.

Parameters

osc_meter_controller

the AgsOscMeterController

 

osc_connection

the AgsOscConnection

 

message

the message received

 

message_size

the message size

 

Returns

the GList containing AgsOscResponse

Since: 3.0.0


ags_osc_meter_controller_new ()

AgsOscMeterController *
ags_osc_meter_controller_new ();

Instantiate new AgsOscMeterController

Returns

the AgsOscMeterController

Since: 3.0.0


AGS_IS_OSC_METER_CONTROLLER()

#define AGS_IS_OSC_METER_CONTROLLER(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_OSC_METER_CONTROLLER))

AGS_IS_OSC_METER_CONTROLLER_CLASS()

#define AGS_IS_OSC_METER_CONTROLLER_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_OSC_METER_CONTROLLER))

AGS_OSC_METER_CONTROLLER()

#define AGS_OSC_METER_CONTROLLER(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_OSC_METER_CONTROLLER, AgsOscMeterController))

AGS_OSC_METER_CONTROLLER_CLASS()

#define AGS_OSC_METER_CONTROLLER_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_OSC_METER_CONTROLLER, AgsOscMeterControllerClass))

AGS_OSC_METER_CONTROLLER_GET_CLASS()

#define AGS_OSC_METER_CONTROLLER_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_OSC_METER_CONTROLLER, AgsOscMeterControllerClass))

ags_osc_meter_controller_get_type ()

GType
ags_osc_meter_controller_get_type ();

Types and Values

AGS_OSC_METER_CONTROLLER_DEFAULT_MONITOR_TIMEOUT

#define AGS_OSC_METER_CONTROLLER_DEFAULT_MONITOR_TIMEOUT (1.0 / 30.0)

enum AgsOscMeterControllerFlags

Members

AGS_OSC_METER_CONTROLLER_MONITOR_STARTED

   

AGS_OSC_METER_CONTROLLER_MONITOR_RUNNING

   

AGS_OSC_METER_CONTROLLER_MONITOR_TERMINATING

   

struct AgsOscMeterControllerMonitor

struct AgsOscMeterControllerMonitor {
  volatile gint ref_count;

  AgsOscConnection *osc_connection;

  gchar *path;
  AgsPort *port;
};

AGS_TYPE_OSC_METER_CONTROLLER

#define AGS_TYPE_OSC_METER_CONTROLLER                (ags_osc_meter_controller_get_type())

struct AgsOscMeterController

struct AgsOscMeterController;

struct AgsOscMeterControllerClass

struct AgsOscMeterControllerClass {
  AgsOscControllerClass osc_controller;

  void (*start_monitor)(AgsOscMeterController *osc_meter_controller);
  void (*stop_monitor)(AgsOscMeterController *osc_meter_controller);

  gpointer (*monitor_meter)(AgsOscMeterController *osc_meter_controller,
			    AgsOscConnection *osc_connection,
			    guchar *message, guint message_size);
};

Signal Details

The “monitor-meter” signal

gpointer
user_function (AgsOscMeterController *osc_meter_controller,
               GObject               *osc_connection,
               gpointer               message,
               guint                  message_size,
               gpointer               user_data)

The ::monitor-meter signal is emited during get data of meter controller.

Parameters

osc_meter_controller

the AgsOscMeterController

 

osc_connection

the AgsOscConnection

 

message

the message received

 

message_size

the message size

 

user_data

user data set when the signal handler was connected.

 

Returns

the AgsOscResponse

Flags: Run Last

Since: 3.0.0


The “start-monitor” signal

void
user_function (AgsOscMeterController *osc_meter_controller,
               gpointer               user_data)

The ::start-monitor signal is emited during start of monitoring meter.

Parameters

osc_meter_controller

the AgsOscMeterController

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0


The “stop-monitor” signal

void
user_function (AgsOscMeterController *osc_meter_controller,
               gpointer               user_data)

The ::stop-monitor signal is emited during stop of monitoring meter.

Parameters

osc_meter_controller

the AgsOscMeterController

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 3.0.0