AgsRecall

AgsRecall — The recall base class

Synopsis

#define             AGS_RECALL_DEFAULT_BUILD_ID
#define             AGS_RECALL_DEFAULT_VERSION
#define             AGS_RECALL_HANDLER                  (handler)
struct              AgsRecall;
struct              AgsRecallClass;
enum                AgsRecallFlags;
struct              AgsRecallHandler;
enum                AgsRecallNotifyDependencyMode;
void                ags_recall_add_child                (AgsRecall *recall,
                                                         AgsRecall *child);
void                ags_recall_add_dependency           (AgsRecall *recall,
                                                         AgsRecallDependency *dependency);
void                ags_recall_add_handler              (AgsRecall *recall,
                                                         AgsRecallHandler *recall_handler);
void                ags_recall_cancel                   (AgsRecall *recall);
void                ags_recall_child_added              (AgsRecall *parent,
                                                         AgsRecall *child);
void                ags_recall_done                     (AgsRecall *recall);
AgsRecall *         ags_recall_duplicate                (AgsRecall *recall,
                                                         AgsRecallID *recall_id);
GList *             ags_recall_find_by_effect           (GList *list,
                                                         AgsRecallID *recall_id,
                                                         char *effect);
GList *             ags_recall_find_provider            (GList *recall,
                                                         GObject *provider);
GList *             ags_recall_find_provider_with_recycling_container
                                                        (GList *recall,
                                                         GObject *provider,
                                                         GObject *recycling_container);
GList *             ags_recall_find_recycling_container (GList *recall,
                                                         GObject *recycling_container);
GList *             ags_recall_find_template            (GList *recall);
GList *             ags_recall_find_type                (GList *recall,
                                                         GType type);
GList *             ags_recall_find_type_with_recycling_container
                                                        (GList *recall,
                                                         GType type,
                                                         GObject *recycling_container);
GList *             ags_recall_get_children             (AgsRecall *recall);
GList *             ags_recall_get_dependencies         (AgsRecall *recall);
AgsRecallHandler *  ags_recall_handler_alloc            (const gchar *signal_name,
                                                         GCallback callback,
                                                         GObject *data);
gboolean            ags_recall_is_done                  (GList *recalls,
                                                         GObject *recycling_container);
AgsRecall *         ags_recall_new                      ();
void                ags_recall_notify_dependency        (AgsRecall *recall,
                                                         guint dependency,
                                                         gint count);
void                ags_recall_remove                   (AgsRecall *recall);
void                ags_recall_remove_child             (AgsRecall *recall,
                                                         AgsRecall *child);
void                ags_recall_remove_dependency        (AgsRecall *recall,
                                                         AgsRecall *template);
void                ags_recall_remove_handler           (AgsRecall *recall,
                                                         AgsRecallHandler *recall_handler);
void                ags_recall_resolve_dependencies     (AgsRecall *reall);
void                ags_recall_run_init                 (AgsRecall *recall,
                                                         guint stage);
void                ags_recall_run_init_inter           (AgsRecall *recall);
void                ags_recall_run_init_post            (AgsRecall *recall);
void                ags_recall_run_init_pre             (AgsRecall *recall);
void                ags_recall_run_inter                (AgsRecall *recall);
void                ags_recall_run_post                 (AgsRecall *recall);
void                ags_recall_run_pre                  (AgsRecall *recall);
void                ags_recall_set_devout_recursive     (AgsRecall *recall,
                                                         GObject *devout);
void                ags_recall_set_effect               (AgsRecall *recall,
                                                         char *effect);
void                ags_recall_set_flags                (AgsRecall *recall,
                                                         guint flags);
void                ags_recall_set_recall_id            (AgsRecall *recall,
                                                         AgsRecallID *recall_id);
void                ags_recall_stop_persistent          (AgsRecall *recall);
GList *             ags_recall_template_find_provider   (GList *recall,
                                                         GObject *provider);
GList *             ags_recall_template_find_type       (GList *recall,
                                                         GType type);

Description

AgsRecall acts as effect processor.

Details

AGS_RECALL_DEFAULT_BUILD_ID

#define AGS_RECALL_DEFAULT_BUILD_ID "CEST 02-10-2014 19:36\0"

AGS_RECALL_DEFAULT_VERSION

#define AGS_RECALL_DEFAULT_VERSION "0.4.2\0"

AGS_RECALL_HANDLER()

#define AGS_RECALL_HANDLER(handler)    ((AgsRecallHandler *)(handler))

struct AgsRecall

struct AgsRecall {
  GObject object;

  guint flags;

  GObject *devout;
  GObject *container; // see AgsRecallContainer

  gchar *version;
  gchar *build_id;

  gchar *effect;
  gchar *name;

  gchar *xml_type;

  GList *dependencies;

  AgsRecallID *recall_id;

  AgsRecall *parent;
  GList *children;

  GType child_type;
  GParameter *child_parameters;
  guint n_params;

  GList *port;
  
  GList *handlers;
};

struct AgsRecallClass

struct AgsRecallClass {
  GObjectClass object;

  void (*resolve_dependencies)(AgsRecall *recall);

  void (*run_init_pre)(AgsRecall *recall);
  void (*run_init_inter)(AgsRecall *recall);
  void (*run_init_post)(AgsRecall *recall);

  void (*run_pre)(AgsRecall *recall);
  void (*run_inter)(AgsRecall *recall);
  void (*run_post)(AgsRecall *recall);

  void (*stop_persistent)(AgsRecall *recall);
  void (*done)(AgsRecall *recall);

  void (*cancel)(AgsRecall *recall);
  void (*remove)(AgsRecall *recall);

  AgsRecall* (*duplicate)(AgsRecall *recall,
			  AgsRecallID *recall_id,
			  guint *n_params, GParameter *params); // if a sequencer is linked with a sequencer the AgsRecall's with the flag AGS_RECALL_SOURCE must be duplicated

  void (*notify_dependency)(AgsRecall *recall, guint dependency, gboolean increase);

  void (*child_added)(AgsRecall *recall, AgsRecall *child);
};

enum AgsRecallFlags

typedef enum {
  AGS_RECALL_CONNECTED             = 1,
  AGS_RECALL_RUN_INITIALIZED       = 1 <<  1, //TODO:JK: rename to AGS_RECALL_RUN_CONNECTED
  AGS_RECALL_TEMPLATE              = 1 <<  2,
  AGS_RECALL_PLAYBACK              = 1 <<  3,
  AGS_RECALL_SEQUENCER             = 1 <<  4,
  AGS_RECALL_NOTATION              = 1 <<  5,
  AGS_RECALL_DEFAULT_TEMPLATE      = 1 <<  6,
  //TODO:JK: remove because it's useless
  AGS_RECALL_DYNAMIC_CONNECTED     = 1 <<  7,
  AGS_RECALL_INPUT_ORIENTATED      = 1 <<  8,
  AGS_RECALL_OUTPUT_ORIENTATED     = 1 <<  9,
  AGS_RECALL_PERSISTENT            = 1 << 10,
  AGS_RECALL_INITIAL_RUN           = 1 << 11,
  AGS_RECALL_TERMINATING           = 1 << 12,
  AGS_RECALL_DONE                  = 1 << 13,
  AGS_RECALL_REMOVE                = 1 << 14,
  AGS_RECALL_HIDE                  = 1 << 15,
  AGS_RECALL_PROPAGATE_DONE        = 1 << 16, // see ags_recall_real_remove
  AGS_RECALL_PERSISTENT_PLAYBACK   = 1 << 17,
  AGS_RECALL_PERSISTENT_SEQUENCER  = 1 << 18,
  AGS_RECALL_PERSISTENT_NOTATION   = 1 << 19,
  AGS_RECALL_SKIP_DEPENDENCIES     = 1 << 20,
} AgsRecallFlags;

struct AgsRecallHandler

struct AgsRecallHandler {
  const gchar *signal_name;
  GCallback callback;
  GObject *data;
  gulong handler;
};

A AgsRecallHandler acts as a callback definition


enum AgsRecallNotifyDependencyMode

typedef enum {
  AGS_RECALL_NOTIFY_RUN,
  AGS_RECALL_NOTIFY_AUDIO,
  AGS_RECALL_NOTIFY_AUDIO_RUN,
  AGS_RECALL_NOTIFY_CHANNEL,
  AGS_RECALL_NOTIFY_CHANNEL_RUN,
  AGS_RECALL_NOTIFY_RECALL,
} AgsRecallNotifyDependencyMode;

ags_recall_add_child ()

void                ags_recall_add_child                (AgsRecall *recall,
                                                         AgsRecall *child);

An AgsRecall may have children.

parent :

an AgsRecall

child :

an AgsRecall

Since 0.4


ags_recall_add_dependency ()

void                ags_recall_add_dependency           (AgsRecall *recall,
                                                         AgsRecallDependency *dependency);

Associate a new dependency for this recall.

recall :

an AgsRecall

recall_dependency :

an AgsRecallDependency

Since 0.4


ags_recall_add_handler ()

void                ags_recall_add_handler              (AgsRecall *recall,
                                                         AgsRecallHandler *recall_handler);

Connect callback to recall specified by recall_handler.

recall :

the AgsRecall to connect

recall_handler :

the signal specs

Since 0.4


ags_recall_cancel ()

void                ags_recall_cancel                   (AgsRecall *recall);

The AgsRecall doesn't want to run anymore, it aborts further execution.

recall :

an AgsRecall

Since 0.4


ags_recall_child_added ()

void                ags_recall_child_added              (AgsRecall *parent,
                                                         AgsRecall *child);

ags_recall_done ()

void                ags_recall_done                     (AgsRecall *recall);

The AgsRecall doesn't want to run anymore, it has been done its work.

recall :

an AgsRecall

Since 0.4


ags_recall_duplicate ()

AgsRecall *         ags_recall_duplicate                (AgsRecall *recall,
                                                         AgsRecallID *recall_id);

Should duplicate an AgsRecall, so it can pass the runs. Mainly used for creating duplicates from templates, see AGS_RECALL_TEMPLATE.

recall :

an AgsRecall

recall_id :

an AgsRecallID

n_params :

the count of parameter entries

parameter :

the properties to be passed for instantiating the AgsRecall

Since 0.4


ags_recall_find_by_effect ()

GList *             ags_recall_find_by_effect           (GList *list,
                                                         AgsRecallID *recall_id,
                                                         char *effect);

Finds next matching effect name. Intended to be used as iteration function.

list :

a GList with recalls

recall_id :

an AgsRecallId

effect :

the effect name

Returns :

a GList, or NULL if not found

Since 0.4


ags_recall_find_provider ()

GList *             ags_recall_find_provider            (GList *recall,
                                                         GObject *provider);

Finds provider eg. AgsAudio or AgsChannel within GList containig AgsRecall.

recall :

a GList containing recalls

provider :

a GObject

Returns :

a GList containing recalls, or NULL if not found

Since 0.4


ags_recall_find_provider_with_recycling_container ()

GList *             ags_recall_find_provider_with_recycling_container
                                                        (GList *recall,
                                                         GObject *provider,
                                                         GObject *recycling_container);

Like ags_recall_template_find_provider() but given additionally recycling_container as search parameter.

recall_i :

a GList containing recalls

provider :

a GObject

recycling_container :

an AgsRecyclingContainer

Returns :

a GList containing recalls, or NULL if not found

Since 0.4


ags_recall_find_recycling_container ()

GList *             ags_recall_find_recycling_container (GList *recall,
                                                         GObject *recycling_container);

Finds next matching recall which has recycling_container, see AgsRecallId for further details about AgsRecyclingContainer. Intended to be used as iteration function.

recall_i :

a GList containing recalls

recycling_container :

an AgsRecyclingContainer

Returns :

a GList containing recalls, or NULL if not found

Since 0.4


ags_recall_find_template ()

GList *             ags_recall_find_template            (GList *recall);

Finds next template, see AGS_RECALL_TEMPLATE flag. Intended to be used as iteration function.

Returns :

a GList containing recalls, or NULL if not found

Since 0.4


ags_recall_find_type ()

GList *             ags_recall_find_type                (GList *recall,
                                                         GType type);

Finds next matching recall for type. Intended to be used as iteration function.

recall_i :

a GList containing recalls

type :

a GType

Returns :

a GList containing recalls, or NULL if not found

Since 0.4


ags_recall_find_type_with_recycling_container ()

GList *             ags_recall_find_type_with_recycling_container
                                                        (GList *recall,
                                                         GType type,
                                                         GObject *recycling_container);

Finds next matching recall for type which has recycling_container, see AgsRecallId for further details about AgsRecyclingContainer. Intended to be used as iteration function.

recall_i :

a GList containing recalls

type :

a GType

recycling_container :

an AgsRecyclingContainer

Returns :

a GList containing recalls, or NULL if not found

Since 0.4


ags_recall_get_children ()

GList *             ags_recall_get_children             (AgsRecall *recall);

Retrieve children.

recall :

an AgsRecall

Returns :

a GList with all children.

Since 0.4


ags_recall_get_dependencies ()

GList *             ags_recall_get_dependencies         (AgsRecall *recall);

Retrieve dependencies.

recall :

an AgsRecall

Returns :

a GList with all dependencies.

Since 0.4


ags_recall_handler_alloc ()

AgsRecallHandler *  ags_recall_handler_alloc            (const gchar *signal_name,
                                                         GCallback callback,
                                                         GObject *data);

Allocates AgsRecallHandler.

signal_name :

signal's name to connect

callback :

the GCallback function

data :

the data to pass the callback

Since 0.4


ags_recall_is_done ()

gboolean            ags_recall_is_done                  (GList *recalls,
                                                         GObject *recycling_container);

Check if recall is over.

recall :

an AgsRecall

recycling_container :

an AgsRecyclingContainer

Since 0.4


ags_recall_new ()

AgsRecall *         ags_recall_new                      ();

Creates an AgsRecall.

Returns :

a new AgsRecall.

Since 0.3


ags_recall_notify_dependency ()

void                ags_recall_notify_dependency        (AgsRecall *recall,
                                                         guint dependency,
                                                         gint count);

Notifies a recall that an other depends on it.

recall :

an AgsRecall

flags :

see AgsRecallNotifyDependencyMode

count :

how many dependencies

Since 0.4


ags_recall_remove ()

void                ags_recall_remove                   (AgsRecall *recall);

The AgsRecall will be removed immediately.

recall :

an AgsRecall

Since 0.4


ags_recall_remove_child ()

void                ags_recall_remove_child             (AgsRecall *recall,
                                                         AgsRecall *child);

An AgsRecall may have children.

parent :

an AgsRecall

child :

an AgsRecall

Since 0.4


ags_recall_remove_dependency ()

void                ags_recall_remove_dependency        (AgsRecall *recall,
                                                         AgsRecall *template);

Remove a prior associated dependency.

recall :

an AgsRecall

dependency :

an AgsRecall

Since 0.4


ags_recall_remove_handler ()

void                ags_recall_remove_handler           (AgsRecall *recall,
                                                         AgsRecallHandler *recall_handler);

Remove a AgsRecallHandler from recall.

recall :

the AgsRecall to connect

recall_handler :

the signal specs

Since 0.4


ags_recall_resolve_dependencies ()

void                ags_recall_resolve_dependencies     (AgsRecall *reall);

A signal indicating that the inheriting object should resolve it's dependencies.

recall :

an AgsRecall

Since 0.4


ags_recall_run_init ()

void                ags_recall_run_init                 (AgsRecall *recall,
                                                         guint stage);

ags_recall_run_init_inter ()

void                ags_recall_run_init_inter           (AgsRecall *recall);

Prepare for run, this is the inter stage within the preparation.

recall :

an AgsRecall

Since 0.4


ags_recall_run_init_post ()

void                ags_recall_run_init_post            (AgsRecall *recall);

Prepare for run, this is the post stage within the preparation.

recall :

an AgsRecall

Since 0.4


ags_recall_run_init_pre ()

void                ags_recall_run_init_pre             (AgsRecall *recall);

Prepare for run, this is the pre stage within the preparation.

recall :

an AgsRecall

Since 0.4


ags_recall_run_inter ()

void                ags_recall_run_inter                (AgsRecall *recall);

This is the inter stage within a run.

recall :

an AgsRecall

Since 0.4


ags_recall_run_post ()

void                ags_recall_run_post                 (AgsRecall *recall);

This is the post stage within a run.

recall :

an AgsRecall

Since 0.4


ags_recall_run_pre ()

void                ags_recall_run_pre                  (AgsRecall *recall);

This is the pre stage within a run.

recall :

an AgsRecall

Since 0.4


ags_recall_set_devout_recursive ()

void                ags_recall_set_devout_recursive     (AgsRecall *recall,
                                                         GObject *devout);

ags_recall_set_effect ()

void                ags_recall_set_effect               (AgsRecall *recall,
                                                         char *effect);

ags_recall_set_flags ()

void                ags_recall_set_flags                (AgsRecall *recall,
                                                         guint flags);

Set flags recursivly.

recall :

an AgsRecall

flags :

the flags mask

Since 0.4


ags_recall_set_recall_id ()

void                ags_recall_set_recall_id            (AgsRecall *recall,
                                                         AgsRecallID *recall_id);

Sets the recall id recursively.

recall :

an AgsRecall

recall_id :

the AgsRecallID to set

Since 0.4


ags_recall_stop_persistent ()

void                ags_recall_stop_persistent          (AgsRecall *recall);

Unsets the AGS_RECALL_PERSISTENT flag set and invokes ags_recall_done().

recall :

an AgsRecall

Since 0.4


ags_recall_template_find_provider ()

GList *             ags_recall_template_find_provider   (GList *recall,
                                                         GObject *provider);

ags_recall_template_find_type ()

GList *             ags_recall_template_find_type       (GList *recall,
                                                         GType type);

Finds next matching recall for type which is a template, see AGS_RECALL_TEMPLATE flag. Intended to be used as iteration function.

recall_i :

a GList containing recalls

type :

a GType

Returns :

a GList containing recalls, or NULL if not found

Since 0.4