AgsAudioLoop

AgsAudioLoop — audio loop

Functions

Properties

Types and Values

Object Hierarchy

    GObject
    ╰── AgsThread
        ╰── AgsAudioLoop

Implemented Interfaces

AgsAudioLoop implements AgsConnectable and AgsMainLoop.

Includes

#include <ags/audio/thread/ags_audio_loop.h>

Description

The AgsAudioLoop is suitable as AgsMainLoop and does audio processing.

Functions

ags_audio_loop_add_audio ()

void
ags_audio_loop_add_audio (AgsAudioLoop *audio_loop,
                          GObject *audio);

Add audio for playback.

Parameters

audio_loop

the AgsAudioLoop

 

audio

an AgsAudio

 

Since: 2.0.0


ags_audio_loop_remove_audio ()

void
ags_audio_loop_remove_audio (AgsAudioLoop *audio_loop,
                             GObject *audio);

Remove audio of playback.

Parameters

audio_loop

the AgsAudioLoop

 

audio

an AgsAudio

 

Since: 2.0.0


ags_audio_loop_add_channel ()

void
ags_audio_loop_add_channel (AgsAudioLoop *audio_loop,
                            GObject *channel);

Add channel for playback.

Parameters

audio_loop

the AgsAudioLoop

 

channel

an AgsChannel

 

Since: 2.0.0


ags_audio_loop_remove_channel ()

void
ags_audio_loop_remove_channel (AgsAudioLoop *audio_loop,
                               GObject *channel);

Remove channel of playback.

Parameters

audio_loop

the AgsAudioLoop

 

channel

an AgsChannel

 

Since: 2.0.0


ags_audio_loop_new ()

AgsAudioLoop *
ags_audio_loop_new (GObject *soundcard,
                    GObject *application_context);

Create a new AgsAudioLoop.

Parameters

soundcard

the GObject

 

application_context

the AgsApplicationContext

 

Returns

the new AgsAudioLoop

Since: 2.0.0


AGS_AUDIO_LOOP()

#define AGS_AUDIO_LOOP(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_AUDIO_LOOP, AgsAudioLoop))

AGS_AUDIO_LOOP_CLASS()

#define AGS_AUDIO_LOOP_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_AUDIO_LOOP, AgsAudioLoopClass))

AGS_AUDIO_LOOP_GET_CLASS()

#define AGS_AUDIO_LOOP_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_AUDIO_LOOP, AgsAudioLoopClass))

AGS_IS_AUDIO_LOOP()

#define AGS_IS_AUDIO_LOOP(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_AUDIO_LOOP))

ags_audio_loop_get_type ()

GType
ags_audio_loop_get_type ();

Types and Values

AGS_AUDIO_LOOP_DEFAULT_JIFFIE

#define AGS_AUDIO_LOOP_DEFAULT_JIFFIE (ceil(AGS_SOUNDCARD_DEFAULT_SAMPLERATE / AGS_SOUNDCARD_DEFAULT_BUFFER_SIZE) + AGS_SOUNDCARD_DEFAULT_OVERCLOCK)

enum AgsAudioLoopFlags

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

Members

AGS_AUDIO_LOOP_PLAY_CHANNEL

play channel

 

AGS_AUDIO_LOOP_PLAYING_CHANNEL

playing channnel

 

AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING

play channe terminating

 

AGS_AUDIO_LOOP_PLAY_AUDIO

play audio

 

AGS_AUDIO_LOOP_PLAYING_AUDIO

playing audio

 

AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING

play audio terminating

 

enum AgsAudioLoopTimingFlags

Enum values to control timing.

Members

AGS_AUDIO_LOOP_TIMING_WAITING

timing waiting

 

AGS_AUDIO_LOOP_TIMING_WAKEUP

timing wakeup

 

AGS_TYPE_AUDIO_LOOP

#define AGS_TYPE_AUDIO_LOOP                (ags_audio_loop_get_type())

struct AgsAudioLoop

struct AgsAudioLoop;

struct AgsAudioLoopClass

struct AgsAudioLoopClass {
  AgsThreadClass thread;
};

Property Details

The “application-context” property

  “application-context”      AgsApplicationContext *

The assigned AgsApplicationContext

Flags: Read / Write

Since: 2.0.0


The “default-output-soundcard” property

  “default-output-soundcard” GObject *

The assigned default soundcard.

Flags: Write

Since: 2.0.0


The “play-audio” property

  “play-audio”               gpointer

An AgsAudio to add for playback.

Flags: Write

Since: 2.0.0


The “play-channel” property

  “play-channel”             gpointer

An AgsChannel to add for playback.

Flags: Write

Since: 2.0.0