AgsAudio

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

Functions

Properties

guint audio-channels Read / Write
guint audio-end-mapping Read / Write
guint audio-start-mapping Read / Write
AgsAutomation * automation Read / Write
guint buffer-size Read / Write
guint format Read / Write
AgsInput * input Read
guint input-lines Read
guint input-pads Read / Write
guint midi-end-mapping Read / Write
GObject * midi-file Read / Write
guint midi-start-mapping Read / Write
AgsNotation * notation Read / Write
AgsOutput * output Read
guint output-lines Read
guint output-pads Read / Write
AgsRecall * play Read / Write
AgsPlaybackDomain * playback-domain Read / Write
AgsRecall * recall Read / Write
AgsRecallContainer * recall-container Read / Write
AgsRecallID * recall-id Read / Write
AgsRecyclingContext * recycling-context Read / Write
guint samplerate Read / Write
guint sequence-length Read / Write
GObject * sequencer Read / Write
GObject * soundcard Read / Write

Signals

Types and Values

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_set_soundcard ()

void
ags_audio_set_soundcard (AgsAudio *audio,
                         GObject *soundcard);

Sets a soundcard object on audio.

Parameters

audio

the AgsAudio

 

soundcard

an AgsSoundcard

 

Since: 0.4


ags_audio_set_flags ()

void
ags_audio_set_flags (AgsAudio *audio,
                     guint flags);

Enable a feature of AgsAudio.

Parameters

audio

an AgsAudio

 

flags

see enum AgsAudioFlags

 

Since: 0.4


ags_audio_unset_flags ()

void
ags_audio_unset_flags (AgsAudio *audio,
                       guint flags);

Disable a feature of AgsAudio.

Parameters

audio

an AgsAudio

 

flags

see enum AgsAudioFlags

 

Since: 0.4


ags_audio_set_audio_channels ()

void
ags_audio_set_audio_channels (AgsAudio *audio,
                              guint audio_channels);

Resize audio channels AgsInput will be allocated first.

Parameters

audio

the AgsAudio

 

audio_channels

new audio channels

 

Since: 0.3


ags_audio_set_pads ()

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

Sets pad count for the apropriate type

Parameters

audio

the AgsAudio

 

type

AGS_TYPE_INPUT or AGS_TYPE_OUTPUT

 

pads

new pad count

 

Since: 0.3


ags_audio_set_samplerate ()

void
ags_audio_set_samplerate (AgsAudio *audio,
                          guint samplerate);

Sets samplerate.

Parameters

audio

the AgsAudio

 

samplerate

the samplerate

 

Since: 0.7.3


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: 0.7.3


ags_audio_set_format ()

void
ags_audio_set_format (AgsAudio *audio,
                      guint format);

Sets buffer length.

Parameters

audio

the AgsAudio

 

format

the format

 

Since: 0.7.45


ags_audio_set_sequence_length ()

void
ags_audio_set_sequence_length (AgsAudio *audio,
                               guint sequence_length);

Sets sequence length.

Parameters

audio

the AgsAudio

 

sequence_length

the sequence length

 

Since: 0.4


ags_audio_add_notation ()

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

Adds a recall id.

Parameters

audio

the AgsAudio

 

notation

the AgsRecallID

 

Since: 0.4


ags_audio_remove_notation ()

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

Removes a recall id.

Parameters

audio

the AgsAudio

 

notation

the AgsRecallID

 

Since: 0.4


ags_audio_add_automation ()

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

Adds a recall id.

Parameters

audio

the AgsAudio

 

automation

the AgsRecallID

 

Since: 0.7.0


ags_audio_remove_automation ()

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

Removes a recall id.

Parameters

audio

the AgsAudio

 

automation

the AgsRecallID

 

Since: 0.7.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: 0.4


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: 0.4


ags_audio_add_recycling_context ()

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

Adds a recycling container.

Parameters

audio

the AgsAudio

 

recycling_context

the AgsRecyclingContext

 

Since: 0.4


ags_audio_remove_recycling_context ()

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

Removes a recycling container.

Parameters

audio

the AgsAudio

 

recycling_context

the AgsRecyclingContext

 

Since: 0.4


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: 0.4


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: 0.4


ags_audio_add_recall ()

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

Adds a recall.

Parameters

audio

the AgsAudio

 

recall

the AgsRecall

 

play

TRUE if simple playback.

 

Since: 0.4


ags_audio_remove_recall ()

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

Removes a recall.

Parameters

audio

the AgsAudio

 

recall

the AgsRecall

 

play

TRUE if simple playback.

 

Since: 0.4


ags_audio_recall_change_state ()

void
ags_audio_recall_change_state (AgsAudio *audio,
                               gboolean enable);


ags_audio_init_run ()

AgsRecallID *
ags_audio_init_run (AgsAudio *audio);

Is emitted as audio is initialized.

Parameters

audio

the AgsAudio

 

Returns

the current AgsRecallID

Since: 0.4


ags_audio_duplicate_recall ()

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

Duplicate all AgsRecall templates of this AgsAudio.

Parameters

audio

the AgsAudio

 

recall_id

an AgsRecallID

 

Since: 0.4


ags_audio_init_recall ()

void
ags_audio_init_recall (AgsAudio *audio,
                       gint stage,
                       AgsRecallID *recall_id);

Initializes the recalls of audio

Parameters

audio

the AgsAudio

 

stage

stage benning at 0 up to 2, or just -1

 

recall_id

the AgsRecallID to use or NULL

 

Since: 0.4


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: 0.4


ags_audio_is_playing ()

gboolean
ags_audio_is_playing (AgsAudio *audio);

Determine if AgsAudio is playing.

Parameters

audio

the AgsAudio

 

Returns

TRUE if it's playing otherwise FALSE

Since: 0.4


ags_audio_play ()

void
ags_audio_play (AgsAudio *audio,
                AgsRecallID *recall_id,
                gint stage);

Performs on single play call of appropriate stage.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

stage

valid range is from 0 up to 2

 

Since: 0.4


ags_audio_tact ()

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

Is emitted as audio is played.

Parameters

audio

the AgsAudio

 

recall_id

the current AgsRecallID

 

Since: 0.4


ags_audio_done ()

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

Is emitted as playing audio is done.

Parameters

audio

the AgsAudio

 

recall_id

the current AgsRecallID

 

Since: 0.4


ags_audio_cancel ()

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

Cancel processing audio data.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

Since: 0.4


ags_audio_remove ()

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

Remove processing audio data.

Parameters

audio

the AgsAudio

 

recall_id

the AgsRecallID to apply to

 

Since: 0.4


ags_audio_find_port ()

GList *
ags_audio_find_port (AgsAudio *audio);

Retrieve all ports of AgsAudio.

Parameters

audio

the AgsAudio

 

Returns

a new GList containing AgsPort

Since: 0.4


ags_audio_open_files ()

void
ags_audio_open_files (AgsAudio *audio,
                      GSList *filenames,
                      gboolean overwrite_channels,
                      gboolean create_channels);

Open some files.

Parameters

audio

the AgsAudio

 

filenames

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: 0.4


ags_audio_recursive_play_init ()

GList *
ags_audio_recursive_play_init (AgsAudio *audio,
                               gboolean playback,
                               gboolean sequencer,
                               gboolean notation);

Initializes AgsAudio in order to do playback, sequencer or notation.

Parameters

audio

the AgsAudio object

 

playback

if doing playback

 

sequencer

if doing sequencer

 

notation

if doing notation

 

Returns

a list containing all AgsRecallID

Since: 0.4


ags_audio_new ()

AgsAudio *
ags_audio_new (GObject *soundcard);

Creates an AgsAudio, with defaults of soundcard .

Parameters

soundcard

an AgsSoundcard

 

Returns

a new AgsAudio

Since: 0.3

Types and Values

enum AgsAudioFlags

Members

AGS_AUDIO_SYNC

   

AGS_AUDIO_ASYNC

   

AGS_AUDIO_OUTPUT_HAS_RECYCLING

   

AGS_AUDIO_INPUT_HAS_RECYCLING

   

AGS_AUDIO_INPUT_TAKES_FILE

   

AGS_AUDIO_INPUT_TAKES_SYNTH

   

AGS_AUDIO_REVERSE_MAPPING

   

AGS_AUDIO_HAS_NOTATION

   

AGS_AUDIO_NOTATION_DEFAULT

   

AGS_AUDIO_PATTERN_MODE

   

AGS_AUDIO_RUNNING

   

AGS_AUDIO_PLAYING

   

Property Details

The “audio-channels” property

  “audio-channels”           guint

The count of audio channels of audio.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 0.7.2


The “audio-end-mapping” property

  “audio-end-mapping”        guint

The audio end mapping.

Flags: Read / Write

Default value: 0

Since: 0.7.3


The “audio-start-mapping” property

  “audio-start-mapping”      guint

The audio start mapping.

Flags: Read / Write

Default value: 0

Since: 0.7.3


The “automation” property

  “automation”               AgsAutomation *

The automation it contains.

Flags: Read / Write

Since: 0.7.2


The “buffer-size” property

  “buffer-size”              guint

The buffer size.

Flags: Read / Write

Default value: 0

Since: 0.7.2


The “format” property

  “format”                   guint

The format.

Flags: Read / Write

Default value: 0

Since: 0.7.45


The “input” property

  “input”                    AgsInput *

The input it contains.

Flags: Read

Since: 0.7.2


The “input-lines” property

  “input-lines”              guint

The count of input lines of audio.

Flags: Read

Allowed values: <= 65535

Default value: 0

Since: 0.7.2


The “input-pads” property

  “input-pads”               guint

The count of input pads of audio.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 0.7.2


The “midi-end-mapping” property

  “midi-end-mapping”         guint

The midi mapping range's start.

Flags: Read / Write

Default value: 0

Since: 0.7.3


The “midi-file” property

  “midi-file”                GObject *

The midi file it is assigned with.

Flags: Read / Write

Since: 0.4


The “midi-start-mapping” property

  “midi-start-mapping”       guint

The midi mapping range's start.

Flags: Read / Write

Default value: 0

Since: 0.7.3


The “notation” property

  “notation”                 AgsNotation *

The notation it contains.

Flags: Read / Write

Since: 0.7.2


The “output” property

  “output”                   AgsOutput *

The output it contains.

Flags: Read

Since: 0.7.2


The “output-lines” property

  “output-lines”             guint

The count of output lines of audio.

Flags: Read

Allowed values: <= 65535

Default value: 0

Since: 0.7.2


The “output-pads” property

  “output-pads”              guint

The count of output pads of audio.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 0.7.2


The “play” property

  “play”                     AgsRecall *

The play it contains.

Flags: Read / Write

Since: 0.7.2


The “playback-domain” property

  “playback-domain”          AgsPlaybackDomain *

The assigned playback domain.

Flags: Read / Write

Since: 0.7.2


The “recall” property

  “recall”                   AgsRecall *

The recall it contains.

Flags: Read / Write

Since: 0.7.2


The “recall-container” property

  “recall-container”         AgsRecallContainer *

The recall container it contains.

Flags: Read / Write

Since: 0.7.2


The “recall-id” property

  “recall-id”                AgsRecallID *

The assigned recall id.

Flags: Read / Write

Since: 0.7.2


The “recycling-context” property

  “recycling-context”        AgsRecyclingContext *

The assigned recall id.

Flags: Read / Write

Since: 0.7.2


The “samplerate” property

  “samplerate”               guint

The samplerate.

Flags: Read / Write

Default value: 0

Since: 0.7.2


The “sequence-length” property

  “sequence-length”          guint

The sequence length.

Flags: Read / Write

Default value: 0

Since: 0.7.2


The “sequencer” property

  “sequencer”                GObject *

The sequencer it is assigned with.

Flags: Read / Write

Since: 0.4


The “soundcard” property

  “soundcard”                GObject *

The soundcard it is assigned with.

Flags: Read / Write

Since: 0.4

Signal Details

The “done” signal

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

Flags: Run Last


The “init-run” signal

GObject*
user_function (AgsAudio *audio,
               gpointer  user_data)

Flags: Run Last


The “set-audio-channels” signal

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

Flags: Run Last


The “set-pads” signal

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

Flags: Run Last


The “tact” signal

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

Flags: Run Last