AgsAudio

AgsAudio — A container of channels organizing them as input or output

Functions

#define AGS_AUDIO_GET_OBJ_MUTEX()
#define AGS_AUDIO_GET_PLAY_MUTEX()
#define AGS_AUDIO_GET_RECALL_MUTEX()
pthread_mutex_t * ags_audio_get_class_mutex ()
gboolean ags_audio_test_flags ()
void ags_audio_set_flags ()
void ags_audio_unset_flags ()
gboolean ags_audio_test_ability_flags ()
void ags_audio_set_ability_flags ()
void ags_audio_unset_ability_flags ()
gboolean ags_audio_test_behaviour_flags ()
void ags_audio_set_behaviour_flags ()
void ags_audio_unset_behaviour_flags ()
gboolean ags_audio_test_staging_flags ()
void ags_audio_set_staging_flags ()
void ags_audio_unset_staging_flags ()
GList * ags_audio_find_name ()
void ags_audio_set_max_audio_channels ()
void ags_audio_set_max_pads ()
void ags_audio_set_audio_channels ()
void ags_audio_set_pads ()
void ags_audio_set_output_soundcard ()
void ags_audio_set_input_soundcard ()
void ags_audio_set_output_sequencer ()
void ags_audio_set_input_sequencer ()
void ags_audio_set_samplerate ()
void ags_audio_set_buffer_size ()
void ags_audio_set_format ()
void ags_audio_add_preset ()
void ags_audio_remove_preset ()
void ags_audio_add_synth_generator ()
void ags_audio_remove_synth_generator ()
void ags_audio_add_cursor ()
void ags_audio_remove_cursor ()
void ags_audio_add_notation ()
void ags_audio_remove_notation ()
void ags_audio_add_automation ()
void ags_audio_remove_automation ()
void ags_audio_add_wave ()
void ags_audio_remove_wave ()
void ags_audio_add_midi ()
void ags_audio_remove_midi ()
void ags_audio_add_recall_id ()
void ags_audio_remove_recall_id ()
void ags_audio_add_recycling_context ()
void ags_audio_remove_recycling_context ()
void ags_audio_add_recall_container ()
void ags_audio_remove_recall_container ()
void ags_audio_add_recall ()
void ags_audio_remove_recall ()
void ags_audio_duplicate_recall ()
void ags_audio_resolve_recall ()
void ags_audio_init_recall ()
void ags_audio_play_recall ()
void ags_audio_done_recall ()
void ags_audio_cancel_recall ()
void ags_audio_cleanup_recall ()
GList * ags_audio_start ()
void ags_audio_stop ()
GList * ags_audio_check_scope ()
GList * ags_audio_collect_all_audio_ports ()
GList * ags_audio_collect_all_audio_ports_by_specifier_and_context ()
void ags_audio_open_audio_file_as_channel ()
void ags_audio_open_audio_file_as_wave ()
void ags_audio_open_midi_file_as_midi ()
void ags_audio_open_midi_file_as_notation ()
void ags_audio_recursive_set_property ()
void ags_audio_recursive_run_stage ()
AgsAudio * ags_audio_new ()
#define AGS_AUDIO()
#define AGS_AUDIO_CLASS()
#define AGS_AUDIO_GET_CLASS()
#define AGS_IS_AUDIO()
GType ags_audio_get_type ()

Properties

gint absolute-key Read / Write
guint audio-channels Read / Write
guint audio-end-mapping Read / Write
gchar * audio-name Read / Write
guint audio-start-mapping Read / Write
gpointer automation Read / Write
gdouble bpm Read / Write
guint buffer-size Read / Write
gpointer cursor Read / Write
guint denominator Read / Write
guint format Read / Write
AgsInput * input Read
GObject * input-audio-file Read / Write
guint input-lines Read
GObject * input-midi-file Read / Write
guint input-pads Read / Write
GObject * input-sequencer Read / Write
GObject * input-soundcard Read / Write
gboolean is-minor Read / Write
guint key Read / Write
guint64 loop-end Read / Write
guint64 loop-start Read / Write
guint max-audio-channels Read / Write
guint max-input-pads Read / Write
guint max-output-pads Read / Write
gpointer midi Read / Write
guint midi-channel Read / Write
guint midi-end-mapping Read / Write
guint midi-start-mapping Read / Write
guint min-audio-channels Read / Write
guint min-input-pads Read / Write
guint min-output-pads Read / Write
gpointer notation Read / Write
guint numerator Read / Write
gint octave Read / Write
guint64 offset Read / Write
AgsOutput * output Read
GObject * output-audio-file Read / Write
guint output-lines Read
GObject * output-midi-file Read / Write
guint output-pads Read / Write
GObject * output-sequencer Read / Write
GObject * output-soundcard Read / Write
gpointer play Read / Write
AgsPlaybackDomain * playback-domain Read / Write
gpointer preset Read / Write
gpointer recall Read / Write
gpointer recall-container Read / Write
gpointer recall-id Read / Write
gpointer recycling-context Read / Write
guint samplerate Read / Write
guint sharp-flats Read / Write
gpointer synth-generator Read / Write
gchar * time-signature Read
gpointer wave Read / Write

Signals

Types and Values

enum AgsAudioFlags
#define AGS_TYPE_AUDIO
struct AgsAudio
struct AgsAudioClass

Object Hierarchy

    GObject
    ╰── AgsAudio

Implemented Interfaces

AgsAudio implements AgsConnectable.

Includes

#include <ags/audio/ags_audio.h>

Description

AgsAudio organizes AgsChannel objects either as input or output and is responsible of their alignment. The class can contain AgsRecall objects in order to perform computation on all channels or in audio context. Therefor exists AgsRecyclingContext acting as tree context.

At least one AgsRecallID is assigned to it and has one more if AGS_AUDIO_OUTPUT_HAS_RECYCLING is set as flag.

If AGS_AUDIO_HAS_NOTATION is set as flag one AgsNotation is allocated per audio channel.

Functions

AGS_AUDIO_GET_OBJ_MUTEX()

#define AGS_AUDIO_GET_OBJ_MUTEX(obj) (((AgsAudio *) obj)->obj_mutex)

AGS_AUDIO_GET_PLAY_MUTEX()

#define AGS_AUDIO_GET_PLAY_MUTEX(obj) (((AgsAudio *) obj)->play_mutex)

AGS_AUDIO_GET_RECALL_MUTEX()

#define AGS_AUDIO_GET_RECALL_MUTEX(obj) (((AgsAudio *) obj)->recall_mutex)

ags_audio_get_class_mutex ()

pthread_mutex_t *
ags_audio_get_class_mutex ();

Use this function's returned mutex to access mutex fields.

Returns

the class mutex

Since: 2.0.0


ags_audio_test_flags ()

gboolean
ags_audio_test_flags (AgsAudio *audio,
                      guint flags);

Test flags to be set on audio .

Parameters

audio

the AgsAudio

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 2.0.0


ags_audio_set_flags ()

void
ags_audio_set_flags (AgsAudio *audio,
                     guint flags);

Enable a feature of AgsAudio.

Parameters

audio

the AgsAudio

 

flags

see enum AgsAudioFlags

 

Since: 2.0.0


ags_audio_unset_flags ()

void
ags_audio_unset_flags (AgsAudio *audio,
                       guint flags);

Disable a feature of AgsAudio.

Parameters

audio

the AgsAudio

 

flags

see enum AgsAudioFlags

 

Since: 2.0.0


ags_audio_test_ability_flags ()

gboolean
ags_audio_test_ability_flags (AgsAudio *audio,
                              guint ability_flags);

Test ability_flags to be set on audio .

Parameters

audio

the AgsAudio

 

ability_flags

the ability flags

 

Returns

TRUE if flags are set, else FALSE

Since: 2.0.0


ags_audio_set_ability_flags ()

void
ags_audio_set_ability_flags (AgsAudio *audio,
                             guint ability_flags);

Enable an ability of AgsAudio.

Parameters

audio

the AgsAudio

 

ability_flags

see enum AgsSoundAbilityFlags

 

Since: 2.0.0


ags_audio_unset_ability_flags ()

void
ags_audio_unset_ability_flags (AgsAudio *audio,
                               guint ability_flags);

Disable an ability of AgsAudio.

Parameters

audio

the AgsAudio

 

ability_flags

see enum AgsSoundAbilityFlags

 

Since: 2.0.0


ags_audio_test_behaviour_flags ()

gboolean
ags_audio_test_behaviour_flags (AgsAudio *audio,
                                guint behaviour_flags);

Test behaviour_flags to be set on audio .

Parameters

audio

the AgsAudio

 

behaviour_flags

the behaviour flags

 

Returns

TRUE if flags are set, else FALSE

Since: 2.0.0


ags_audio_set_behaviour_flags ()

void
ags_audio_set_behaviour_flags (AgsAudio *audio,
                               guint behaviour_flags);

Set behaviour flags.

Parameters

audio

the AgsAudio

 

behaviour_flags

the behaviour flags

 

Since: 2.0.0


ags_audio_unset_behaviour_flags ()

void
ags_audio_unset_behaviour_flags (AgsAudio *audio,
                                 guint behaviour_flags);

Unset behaviour flags.

Parameters

audio

the AgsAudio

 

behaviour_flags

the behaviour flags

 

Since: 2.0.0


ags_audio_test_staging_flags ()

gboolean
ags_audio_test_staging_flags (AgsAudio *audio,
                              gint sound_scope,
                              guint staging_flags);

Test staging_flags to be set on audio .

Parameters

audio

the AgsAudio

 

sound_scope

the AgsSoundScope to test

 

staging_flags

the staging flags

 

Returns

TRUE if flags are set, else FALSE

Since: 2.0.0


ags_audio_set_staging_flags ()

void
ags_audio_set_staging_flags (AgsAudio *audio,
                             gint sound_scope,
                             guint staging_flags);

Set staging flags.

Parameters

audio

the AgsAudio

 

sound_scope

the AgsSoundScope to apply, or -1 to apply to all

 

staging_flags

the staging flags

 

Since: 2.0.0


ags_audio_unset_staging_flags ()

void
ags_audio_unset_staging_flags (AgsAudio *audio,
                               gint sound_scope,
                               guint staging_flags);

Unset staging flags.

Parameters

audio

the AgsAudio

 

sound_scope

the AgsSoundScope to apply, or -1 to apply to all

 

staging_flags

the staging flags

 

Since: 2.0.0


ags_audio_find_name ()

GList *
ags_audio_find_name (GList *audio,
                     gchar *audio_name);

Find audio_name in audio .

Parameters

audio

the GList containing AgsAudio

 

audio_name

the audio name to find

 

Returns

the next matching GList containing AgsAudio

Since: 2.1.0


ags_audio_set_max_audio_channels ()

void
ags_audio_set_max_audio_channels (AgsAudio *audio,
                                  guint max_audio_channels);

Set maximum audio channels.

Parameters

audio

the AgsAudio

 

max_audio_channels

maximum of audio channels

 

Since: 2.0.0


ags_audio_set_max_pads ()

void
ags_audio_set_max_pads (AgsAudio *audio,
                        GType channel_type,
                        guint max_pads);

Set maximum pads of channel_type .

Parameters

audio

the AgsAudio

 

channel_type

the GType of channel, either AGS_TYPE_OUTPUT or AGS_TYPE_INPUT

 

max_pads

maximum of pads

 

Since: 2.0.0


ags_audio_set_audio_channels ()

void
ags_audio_set_audio_channels (AgsAudio *audio,
                              guint audio_channels,
                              guint audio_channels_old);

Resize audio channels AgsInput will be allocated first.

Parameters

audio

the AgsAudio

 

audio_channels

new audio channels

 

audio_channels_old

old audio channels

 

Since: 2.0.0


ags_audio_set_pads ()

void
ags_audio_set_pads (AgsAudio *audio,
                    GType channel_type,
                    guint pads,
                    guint pads_old);

Set pad count for the apropriate channel_type

Parameters

audio

the AgsAudio

 

channel_type

AGS_TYPE_INPUT or AGS_TYPE_OUTPUT

 

pads

new pad count

 

pads_old

old pad count

 

Since: 2.0.0


ags_audio_set_output_soundcard ()

void
ags_audio_set_output_soundcard (AgsAudio *audio,
                                GObject *output_soundcard);

Set the output soundcard object of audio .

Parameters

audio

the AgsAudio

 

output_soundcard

an AgsSoundcard

 

Since: 2.0.0


ags_audio_set_input_soundcard ()

void
ags_audio_set_input_soundcard (AgsAudio *audio,
                               GObject *input_soundcard);

Set the input soundcard object on audio.

Parameters

audio

the AgsAudio

 

input_soundcard

an AgsSoundcard

 

Since: 2.0.0


ags_audio_set_output_sequencer ()

void
ags_audio_set_output_sequencer (AgsAudio *audio,
                                GObject *sequencer);

Set output sequencer.

Parameters

audio

the AgsAudio

 

sequencer

the output sequencer

 

Since: 2.0.0


ags_audio_set_input_sequencer ()

void
ags_audio_set_input_sequencer (AgsAudio *audio,
                               GObject *sequencer);

Set input sequencer.

Parameters

audio

the AgsAudio

 

sequencer

the input sequencer

 

Since: 2.0.0


ags_audio_set_samplerate ()

void
ags_audio_set_samplerate (AgsAudio *audio,
                          guint samplerate);

Sets samplerate.

Parameters

audio

the AgsAudio

 

samplerate

the samplerate

 

Since: 2.0.0


ags_audio_set_buffer_size ()

void
ags_audio_set_buffer_size (AgsAudio *audio,
                           guint buffer_size);

Sets buffer length.

Parameters

audio

the AgsAudio

 

buffer_size

the buffer length

 

Since: 2.0.0


ags_audio_set_format ()

void
ags_audio_set_format (AgsAudio *audio,
                      guint format);

Sets buffer length.

Parameters

audio

the AgsAudio

 

format

the format

 

Since: 2.0.0


ags_audio_add_preset ()

void
ags_audio_add_preset (AgsAudio *audio,
                      GObject *preset);

Adds a preset.

Parameters

audio

the AgsAudio

 

preset

an AgsPreset

 

Since: 2.0.0


ags_audio_remove_preset ()

void
ags_audio_remove_preset (AgsAudio *audio,
                         GObject *preset);

Removes a preset.

Parameters

audio

the AgsAudio

 

preset

an AgsPreset

 

Since: 2.0.0


ags_audio_add_synth_generator ()

void
ags_audio_add_synth_generator (AgsAudio *audio,
                               GObject *synth_generator);

Adds a synth generator.

Parameters

audio

the AgsAudio

 

synth_generator

an AgsSynthGenerator

 

Since: 2.0.0


ags_audio_remove_synth_generator ()

void
ags_audio_remove_synth_generator (AgsAudio *audio,
                                  GObject *synth_generator);

Removes a synth generator.

Parameters

audio

the AgsAudio

 

synth_generator

an AgsSynthGenerator

 

Since: 2.0.0


ags_audio_add_cursor ()

void
ags_audio_add_cursor (AgsAudio *audio,
                      GObject *cursor);

Adds a cursor.

Parameters

audio

the AgsAudio

 

cursor

the GObject implementing AgsCursor

 

Since: 2.2.0


ags_audio_remove_cursor ()

void
ags_audio_remove_cursor (AgsAudio *audio,
                         GObject *cursor);

Removes a cursor.

Parameters

audio

the AgsAudio

 

cursor

the GObject implementing AgsCursor

 

Since: 2.2.0


ags_audio_add_notation ()

void
ags_audio_add_notation (AgsAudio *audio,
                        GObject *notation);

Adds a notation.

Parameters

audio

the AgsAudio

 

notation

the AgsNotation

 

Since: 2.0.0


ags_audio_remove_notation ()

void
ags_audio_remove_notation (AgsAudio *audio,
                           GObject *notation);

Removes a notation.

Parameters

audio

the AgsAudio

 

notation

the AgsNotation

 

Since: 2.0.0


ags_audio_add_automation ()

void
ags_audio_add_automation (AgsAudio *audio,
                          GObject *automation);

Adds an automation.

Parameters

audio

the AgsAudio

 

automation

the AgsAutomation

 

Since: 2.0.0


ags_audio_remove_automation ()

void
ags_audio_remove_automation (AgsAudio *audio,
                             GObject *automation);

Removes an automation.

Parameters

audio

the AgsAudio

 

automation

the AgsAutomation

 

Since: 2.0.0


ags_audio_add_wave ()

void
ags_audio_add_wave (AgsAudio *audio,
                    GObject *wave);

Adds a wave.

Parameters

audio

the AgsAudio

 

wave

the AgsWave

 

Since: 2.0.0


ags_audio_remove_wave ()

void
ags_audio_remove_wave (AgsAudio *audio,
                       GObject *wave);

Removes a wave.

Parameters

audio

the AgsAudio

 

wave

the AgsWave

 

Since: 2.0.0


ags_audio_add_midi ()

void
ags_audio_add_midi (AgsAudio *audio,
                    GObject *midi);

Adds a midi.

Parameters

audio

the AgsAudio

 

midi

the AgsMidi

 

Since: 2.0.0


ags_audio_remove_midi ()

void
ags_audio_remove_midi (AgsAudio *audio,
                       GObject *midi);

Removes a midi.

Parameters

audio

the AgsAudio

 

midi

the AgsMidi

 

Since: 2.0.0


ags_audio_add_recall_id ()

void
ags_audio_add_recall_id (AgsAudio *audio,
                         GObject *recall_id);

Adds a recall id.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

Since: 2.0.0


ags_audio_remove_recall_id ()

void
ags_audio_remove_recall_id (AgsAudio *audio,
                            GObject *recall_id);

Removes a recall id.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

Since: 2.0.0


ags_audio_add_recycling_context ()

void
ags_audio_add_recycling_context (AgsAudio *audio,
                                 GObject *recycling_context);

Adds a recycling context.

Parameters

audio

the AgsAudio

 

recycling_context

the AgsRecyclingContext

 

Since: 2.0.0


ags_audio_remove_recycling_context ()

void
ags_audio_remove_recycling_context (AgsAudio *audio,
                                    GObject *recycling_context);

Removes a recycling context.

Parameters

audio

the AgsAudio

 

recycling_context

the AgsRecyclingContext

 

Since: 2.0.0


ags_audio_add_recall_container ()

void
ags_audio_add_recall_container (AgsAudio *audio,
                                GObject *recall_container);

Adds a recall container.

Parameters

audio

the AgsAudio

 

recall_container

the AgsRecallContainer

 

Since: 2.0.0


ags_audio_remove_recall_container ()

void
ags_audio_remove_recall_container (AgsAudio *audio,
                                   GObject *recall_container);

Removes a recall container.

Parameters

audio

the AgsAudio

 

recall_container

the AgsRecallContainer

 

Since: 2.0.0


ags_audio_add_recall ()

void
ags_audio_add_recall (AgsAudio *audio,
                      GObject *recall,
                      gboolean play_context);

Adds a recall to audio .

Parameters

audio

the AgsAudio

 

recall

the AgsRecall

 

play_context

if TRUE play context, else if FALSE recall context

 

Since: 2.0.0


ags_audio_remove_recall ()

void
ags_audio_remove_recall (AgsAudio *audio,
                         GObject *recall,
                         gboolean play_context);

Removes a recall from audio .

Parameters

audio

the AgsAudio

 

recall

the AgsRecall

 

play_context

if TRUE play context, else if FALSE recall context

 

Since: 2.0.0


ags_audio_duplicate_recall ()

void
ags_audio_duplicate_recall (AgsAudio *audio,
                            AgsRecallID *recall_id,
                            guint pad,
                            guint audio_channel,
                            guint line);

Duplicate all AgsRecall templates of audio .

Parameters

audio

the AgsAudio

 

recall_id

an AgsRecallID

 

pad

the pad

 

audio_channel

the audio channel

 

line

the line

 

Since: 2.0.0


ags_audio_resolve_recall ()

void
ags_audio_resolve_recall (AgsAudio *audio,
                          AgsRecallID *recall_id);

Performs resolving of recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to use

 

Since: 2.0.0


ags_audio_init_recall ()

void
ags_audio_init_recall (AgsAudio *audio,
                       AgsRecallID *recall_id,
                       guint staging_flags);

Initializes the recalls of audio

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to use or NULL

 

staging_flags

staging flags, see AgsSoundStagingFlags

 

Since: 2.0.0


ags_audio_play_recall ()

void
ags_audio_play_recall (AgsAudio *audio,
                       AgsRecallID *recall_id,
                       guint staging_flags);

Performs play for the specified staging_flags .

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

staging_flags

staging flags, see AgsSoundStagingFlags

 

Since: 2.0.0


ags_audio_done_recall ()

void
ags_audio_done_recall (AgsAudio *audio,
                       AgsRecallID *recall_id);

Done processing audio data.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

Since: 2.0.0


ags_audio_cancel_recall ()

void
ags_audio_cancel_recall (AgsAudio *audio,
                         AgsRecallID *recall_id);

Cancel processing audio data.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

Since: 2.0.0


ags_audio_cleanup_recall ()

void
ags_audio_cleanup_recall (AgsAudio *audio,
                          AgsRecallID *recall_id);

Cleanup processing audio data.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

Since: 2.0.0


ags_audio_start ()

GList *
ags_audio_start (AgsAudio *audio,
                 gint sound_scope);

Is emitted as audio is started.

Parameters

audio

the AgsAudio

 

sound_scope

the scope

 

Returns

the GList containing AgsRecallID

Since: 2.0.0


ags_audio_stop ()

void
ags_audio_stop (AgsAudio *audio,
                GList *recall_id,
                gint sound_scope);

Is emitted as playing audio is stopped.

Parameters

audio

the AgsAudio

 

recall_id

the current AgsRecallID

 

sound_scope

the scope

 

Since: 2.0.0


ags_audio_check_scope ()

GList *
ags_audio_check_scope (AgsAudio *audio,
                       gint sound_scope);

Check scope's recall id.

Parameters

audio

the AgsAudio

 

sound_scope

the scope

 

Returns

the scope's recall id of audio

Since: 2.0.0


ags_audio_collect_all_audio_ports ()

GList *
ags_audio_collect_all_audio_ports (AgsAudio *audio);

Retrieve all ports of AgsAudio.

Parameters

audio

the AgsAudio

 

Returns

a new GList containing AgsPort

Since: 2.0.0


ags_audio_collect_all_audio_ports_by_specifier_and_context ()

GList *
ags_audio_collect_all_audio_ports_by_specifier_and_context
                               (AgsAudio *audio,
                                gchar *specifier,
                                gboolean play_context);

ags_audio_open_audio_file_as_channel ()

void
ags_audio_open_audio_file_as_channel (AgsAudio *audio,
                                      GSList *filename,
                                      gboolean overwrite_channels,
                                      gboolean create_channels);

Open some files.

Parameters

audio

the AgsAudio

 

filename

the files to open

 

overwrite_channels

if existing channels should be assigned

 

create_channels

if new channels should be created as not fitting if combined with overwrite_channels

 

Since: 2.0.0


ags_audio_open_audio_file_as_wave ()

void
ags_audio_open_audio_file_as_wave (AgsAudio *audio,
                                   const gchar *filename,
                                   gboolean overwrite_channels,
                                   gboolean create_channels);

ags_audio_open_midi_file_as_midi ()

void
ags_audio_open_midi_file_as_midi (AgsAudio *audio,
                                  const gchar *filename,
                                  const gchar *instrument,
                                  const gchar *track_name,
                                  guint midi_channel);

ags_audio_open_midi_file_as_notation ()

void
ags_audio_open_midi_file_as_notation (AgsAudio *audio,
                                      const gchar *filename,
                                      const gchar *instrument,
                                      const gchar *track_name,
                                      guint midi_channel);

ags_audio_recursive_set_property ()

void
ags_audio_recursive_set_property (AgsAudio *audio,
                                  gint n_params,
                                  const gchar *parameter_name[],
                                  const GValue value[]);

Recursive set property for AgsAudio.

Parameters

audio

the AgsAudio

 

n_params

the count of elements in following arrays

 

parameter_name

the parameter's name array

 

value

the value array

 

Since: 2.0.0


ags_audio_recursive_run_stage ()

void
ags_audio_recursive_run_stage (AgsAudio *audio,
                               gint sound_scope,
                               guint staging_flags);

Resets audio 's sound_scope specified by staging_flags .

Parameters

audio

the AgsAudio object

 

sound_scope

the scope to reset

 

staging_flags

the stage to enable

 

Since: 2.0.0


ags_audio_new ()

AgsAudio *
ags_audio_new (GObject *output_soundcard);

Creates an AgsAudio, with defaults of soundcard .

Parameters

output_soundcard

the AgsSoundcard to use for output

 

Returns

a new AgsAudio

Since: 2.0.0


AGS_AUDIO()

#define AGS_AUDIO(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO, AgsAudio))

AGS_AUDIO_CLASS()

#define AGS_AUDIO_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_AUDIO, AgsAudioClass))

AGS_AUDIO_GET_CLASS()

#define AGS_AUDIO_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS((obj), AGS_TYPE_AUDIO, AgsAudioClass))

AGS_IS_AUDIO()

#define AGS_IS_AUDIO(obj)             (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_AUDIO))

ags_audio_get_type ()

GType
ags_audio_get_type ();

Types and Values

enum AgsAudioFlags

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

Members

AGS_AUDIO_ADDED_TO_REGISTRY

the audio was added to registry, see AgsConnectable::add_to_registry()

 

AGS_AUDIO_CONNECTED

the audio was connected by AgsConnectable::connect()

 

AGS_AUDIO_NO_OUTPUT

no output provided

 

AGS_AUDIO_NO_INPUT

no input provided

 

AGS_AUDIO_SYNC

input/output is mapped synchronously

 

AGS_AUDIO_ASYNC

input/output is mapped asynchronously

 

AGS_AUDIO_OUTPUT_HAS_RECYCLING

output has recycling

 

AGS_AUDIO_OUTPUT_HAS_SYNTH

output has synth

 

AGS_AUDIO_INPUT_HAS_RECYCLING

input has recycling

 

AGS_AUDIO_INPUT_HAS_SYNTH

input has synth

 

AGS_AUDIO_INPUT_HAS_FILE

input takes file

 

AGS_AUDIO_CAN_NEXT_ACTIVE

dispatch can next active

 

AGS_AUDIO_SKIP_OUTPUT

skip output as processing audio data

 

AGS_AUDIO_SKIP_INPUT

skip input as processing audio data

 

AGS_AUDIO_BYPASS

don't apply any data

 

AGS_TYPE_AUDIO

#define AGS_TYPE_AUDIO                (ags_audio_get_type ())

struct AgsAudio

struct AgsAudio;

struct AgsAudioClass

struct AgsAudioClass {
  GObjectClass object;
  
  void (*set_audio_channels)(AgsAudio *audio,
			     guint audio_channels, guint audio_channels_old);
  void (*set_pads)(AgsAudio *audio,
		   GType channel_type,
		   guint pads, guint pads_old);  

  void (*duplicate_recall)(AgsAudio *audio,
			   AgsRecallID *recall_id,
			   guint pad, guint audio_channel,
			   guint line);
  void (*resolve_recall)(AgsAudio *audio,
			 AgsRecallID *recall_id);

  void (*init_recall)(AgsAudio *audio,
		      AgsRecallID *recall_id, guint staging_flags);
  void (*play_recall)(AgsAudio *audio,
		      AgsRecallID *recall_id, guint staging_flags);

  void (*done_recall)(AgsAudio *audio,
		      AgsRecallID *recall_id);
  void (*cancel_recall)(AgsAudio *audio,
			AgsRecallID *recall_id);

  void (*cleanup_recall)(AgsAudio *audio,
			 AgsRecallID *recall_id);

  GList* (*start)(AgsAudio *audio,
		  gint sound_scope);
  void (*stop)(AgsAudio *audio,
	       GList *recall_id, gint sound_scope);

  GList* (*check_scope)(AgsAudio *audio, gint sound_scope);
  
  void (*recursive_run_stage)(AgsAudio *audio,
			      gint sound_scope, guint staging_flags);
};

Property Details

The “absolute-key” property

  “absolute-key”             gint

The absolute key lower.

Flags: Read / Write

Allowed values: [0,128]

Default value: 0

Since: 2.0.0


The “audio-channels” property

  “audio-channels”           guint

The audio channels count.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “audio-end-mapping” property

  “audio-end-mapping”        guint

The audio end mapping.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “audio-name” property

  “audio-name”               gchar *

The name of audio object.

Flags: Read / Write

Default value: NULL

Since: 2.1.0


The “audio-start-mapping” property

  “audio-start-mapping”      guint

The audio start mapping.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “automation” property

  “automation”               gpointer

The AgsAutomation it contains.

Flags: Read / Write

Since: 2.0.0


The “bpm” property

  “bpm”                      gdouble

The bpm.

Flags: Read / Write

Allowed values: >= 0

Default value: 120

Since: 2.0.0


The “buffer-size” property

  “buffer-size”              guint

The buffer length.

Flags: Read / Write

Default value: 1024

Since: 2.0.0


The “cursor” property

  “cursor”                   gpointer

The GObject implementing AgsCursor interface.

Flags: Read / Write

Since: 2.2.0


The “denominator” property

  “denominator”              guint

The denominator of time signature.

Flags: Read / Write

Allowed values: <= 32

Default value: 4

Since: 2.0.0


The “format” property

  “format”                   guint

The format.

Flags: Read / Write

Default value: 16

Since: 2.0.0


The “input” property

  “input”                    AgsInput *

The AgsInput it contains.

Flags: Read

Since: 2.0.0


The “input-audio-file” property

  “input-audio-file”         GObject *

The assigned AgsAudioFile acting as default sink.

Flags: Read / Write

Since: 2.0.0


The “input-lines” property

  “input-lines”              guint

The input lines count.

Flags: Read

Default value: 0

Since: 2.0.0


The “input-midi-file” property

  “input-midi-file”          GObject *

The assigned AgsMidiFile acting as default sink.

Flags: Read / Write

Since: 2.0.0


The “input-pads” property

  “input-pads”               guint

The input pads count.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “input-sequencer” property

  “input-sequencer”          GObject *

The assigned AgsSequencer acting as default source.

Flags: Read / Write

Since: 2.0.0


The “input-soundcard” property

  “input-soundcard”          GObject *

The assigned AgsSoundcard acting as default source.

Flags: Read / Write

Since: 2.0.0


The “is-minor” property

  “is-minor”                 gboolean

Is minor.

Flags: Read / Write

Default value: FALSE

Since: 2.0.0


The “key” property

  “key”                      guint

The key relative to octave.

Flags: Read / Write

Allowed values: <= 12

Default value: 0

Since: 2.0.0


The “loop-end” property

  “loop-end”                 guint64

The audio's loop end.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “loop-start” property

  “loop-start”               guint64

The audio's loop start.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “max-audio-channels” property

  “max-audio-channels”       guint

The maximum audio channels count.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “max-input-pads” property

  “max-input-pads”           guint

The maximum input pads count.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “max-output-pads” property

  “max-output-pads”          guint

The maximum output pads count.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “midi” property

  “midi”                     gpointer

The AgsMidi it contains.

Flags: Read / Write

Since: 2.0.0


The “midi-channel” property

  “midi-channel”             guint

The midi channel.

Flags: Read / Write

Allowed values: <= 16

Default value: 0

Since: 2.0.0


The “midi-end-mapping” property

  “midi-end-mapping”         guint

The midi end mapping.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “midi-start-mapping” property

  “midi-start-mapping”       guint

The midi start mapping.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “min-audio-channels” property

  “min-audio-channels”       guint

The minimum audio channels count.

Flags: Read / Write

Default value: 0

Since: 2.0.31


The “min-input-pads” property

  “min-input-pads”           guint

The minimum input pads count.

Flags: Read / Write

Default value: 0

Since: 2.0.31


The “min-output-pads” property

  “min-output-pads”          guint

The minimum output pads count.

Flags: Read / Write

Default value: 0

Since: 2.0.31


The “notation” property

  “notation”                 gpointer

The AgsNotation it contains.

Flags: Read / Write

Since: 2.0.0


The “numerator” property

  “numerator”                guint

The numerator of time signature.

Flags: Read / Write

Allowed values: <= 32

Default value: 4

Since: 2.0.0


The “octave” property

  “octave”                   gint

The octave lower.

Flags: Read / Write

Allowed values: [0,10]

Default value: 0

Since: 2.0.0


The “offset” property

  “offset”                   guint64

The audio's offset.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “output” property

  “output”                   AgsOutput *

The AgsOutput it contains.

Flags: Read

Since: 2.0.0


The “output-audio-file” property

  “output-audio-file”        GObject *

The assigned AgsAudioFile acting as default sink.

Flags: Read / Write

Since: 2.0.0


The “output-lines” property

  “output-lines”             guint

The output lines count.

Flags: Read

Default value: 0

Since: 2.0.0


The “output-midi-file” property

  “output-midi-file”         GObject *

The assigned AgsMidiFile acting as default sink.

Flags: Read / Write

Since: 2.0.0


The “output-pads” property

  “output-pads”              guint

The output pads count.

Flags: Read / Write

Default value: 0

Since: 2.0.0


The “output-sequencer” property

  “output-sequencer”         GObject *

The assigned AgsSequencer acting as default source.

Flags: Read / Write

Since: 2.0.0


The “output-soundcard” property

  “output-soundcard”         GObject *

The assigned AgsSoundcard acting as default sink.

Flags: Read / Write

Since: 2.0.0


The “play” property

  “play”                     gpointer

The AgsRecall it contains in play-context.

Flags: Read / Write

Since: 2.0.0


The “playback-domain” property

  “playback-domain”          AgsPlaybackDomain *

The assigned AgsPlaybackDomain.

Flags: Read / Write

Since: 2.0.0


The “preset” property

  “preset”                   gpointer

The assigned GList containing AgsPreset information.

Flags: Read / Write

Since: 2.0.0


The “recall” property

  “recall”                   gpointer

The AgsRecall it contains in recall-context.

Flags: Read / Write

Since: 2.0.0


The “recall-container” property

  “recall-container”         gpointer

The AgsRecallContainer it contains in container-context.

Flags: Read / Write

Since: 2.0.0


The “recall-id” property

  “recall-id”                gpointer

The assigned AgsRecallID.

Flags: Read / Write

Since: 2.0.0


The “recycling-context” property

  “recycling-context”        gpointer

The assigned AgsRecyclingContext.

Flags: Read / Write

Since: 2.0.0


The “samplerate” property

  “samplerate”               guint

The samplerate.

Flags: Read / Write

Default value: 48000

Since: 2.0.0


The “sharp-flats” property

  “sharp-flats”              guint

The sharp/flats count.

Flags: Read / Write

Allowed values: <= 12

Default value: 0

Since: 2.0.0


The “synth-generator” property

  “synth-generator”          gpointer

The synth generator.

Flags: Read / Write


The “time-signature” property

  “time-signature”           gchar *

The time signature.

Flags: Read

Default value: "4/4"

Since: 2.0.0


The “wave” property

  “wave”                     gpointer

The AgsWave it contains.

Flags: Read / Write

Since: 2.0.0

Signal Details

The “cancel-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               gpointer  user_data)

The ::cancel-recall signal notifies about canceld recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “check-scope” signal

gpointer
user_function (AgsAudio *audio,
               gint      sound_scope,
               gpointer  user_data)

The ::check-scope method returns the appropriate recall id of sound_scope .

Parameters

audio

the AgsAudio to check the scopes

 

sound_scope

the affected scope

 

user_data

user data set when the signal handler was connected.

 

Returns

the GList containing AgsRecallID

Flags: Run Last

Since: 2.0.0


The “cleanup-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               gpointer  user_data)

The ::cleanup-recall signal notifies about cleanup recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “done-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               gpointer  user_data)

The ::done-recall signal notifies about doned recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “duplicate-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               guint     pad,
               guint     audio_channel,
               guint     line,
               gpointer  user_data)

The ::duplicate-recall signal notifies about duplicated recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

pad

the pad

 

audio_channel

the audio channel

 

line

the line

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “init-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               guint     staging_flags,
               gpointer  user_data)

The ::init-recall signal notifies about initd recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

staging_flags

the staging flags

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “play-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               guint     staging_flags,
               gpointer  user_data)

The ::play-recall signal notifies about playd recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

staging_flags

the staging flags

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “recursive-run-stage” signal

void
user_function (AgsAudio *audio,
               gint      sound_scope,
               guint     staging_flags,
               gpointer  user_data)

The ::recursive-run-stage signal is invoked while run staging of audio for sound_scope .

Parameters

audio

the AgsAudio to run

 

sound_scope

the affected scope

 

staging_flags

the flags to set

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “resolve-recall” signal

void
user_function (AgsAudio *audio,
               GObject  *recall_id,
               gpointer  user_data)

The ::resolve-recall signal notifies about resolved recalls.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “set-audio-channels” signal

void
user_function (AgsAudio *audio,
               guint     audio_channels_new,
               guint     audio_channels_old,
               gpointer  user_data)

The ::set-audio-channels signal notifies about changes in channel alignment.

Parameters

audio

the object to adjust the channels.

 

audio_channels_new

new audio channel count

 

audio_channels_old

old audio channel count

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “set-pads” signal

void
user_function (AgsAudio *audio,
               gulong    channel_type,
               guint     pads_new,
               guint     pads_old,
               gpointer  user_data)

The ::set-pads signal notifies about changes in channel alignment.

Parameters

audio

the object to adjust pads.

 

channel_type

either AGS_TYPE_INPUT or AGS_TYPE_OUTPUT

 

pads_new

new pad count

 

pads_old

old pad count

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0


The “start” signal

gpointer
user_function (AgsAudio *audio,
               gint      sound_scope,
               gpointer  user_data)

The ::start signal is invoked while starting playback of audio .

Parameters

audio

the AgsAudio starts playing

 

sound_scope

the affected scope

 

user_data

user data set when the signal handler was connected.

 

Returns

the GList containing AgsRecallID

Flags: Run Last

Since: 2.0.0


The “stop” signal

void
user_function (AgsAudio *audio,
               gpointer  recall_id,
               gint      sound_scope,
               gpointer  user_data)

The ::stop signal is invoked while stoping playback of audio .

Parameters

audio

the AgsAudio stops playing

 

recall_id

a GList containing AgsRecallID

 

sound_scope

the affected scope

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 2.0.0