AgsAudioLoop

AgsAudioLoop — audio loop

Synopsis

#include <ags/thread/ags_audio_loop.h>

#define             AGS_AUDIO_LOOP_DEFAULT_JIFFIE
struct              AgsAudioLoop;
struct              AgsAudioLoopClass;
enum                AgsAudioLoopFlags;
void                ags_audio_loop_add_audio            (AgsAudioLoop *audio_loop,
                                                         GObject *audio);
void                ags_audio_loop_add_channel          (AgsAudioLoop *audio_loop,
                                                         GObject *channel);
void                ags_audio_loop_add_recall           (AgsAudioLoop *audio_loop,
                                                         gpointer devout_play);
AgsAudioLoop *      ags_audio_loop_new                  (GObject *devout,
                                                         GObject *ags_main);
void                ags_audio_loop_remove_audio         (AgsAudioLoop *audio_loop,
                                                         GObject *audio);
void                ags_audio_loop_remove_channel       (AgsAudioLoop *audio_loop,
                                                         GObject *channel);
void                ags_audio_loop_remove_recall        (AgsAudioLoop *audio_loop,
                                                         gpointer devout_play);

Description

The AgsAudioLoop is suitable as AgsMainLoop and does audio processing.

Details

AGS_AUDIO_LOOP_DEFAULT_JIFFIE

#define AGS_AUDIO_LOOP_DEFAULT_JIFFIE (48.0)

struct AgsAudioLoop

struct AgsAudioLoop {
  AgsThread thread;

  guint flags;

  volatile guint tic;
  volatile guint last_sync;

  GCond cond;
  GMutex mutex;

  gdouble frequency;

  GObject *ags_main;

  AgsAsyncQueue *async_queue;
  
  AgsThread *task_thread;
  AgsThread *gui_thread;
  AgsThread *devout_thread;
  AgsThread *export_thread;

  pthread_mutex_t recall_mutex;

  guint play_recall_ref;
  GList *play_recall; // play AgsRecall

  guint play_channel_ref;
  GList *play_channel; // play AgsChannel

  guint play_audio_ref;
  GList *play_audio; // play AgsAudio

  guint play_notation_ref;
  GList *play_notation;

  GList *tree_sanity;
};

struct AgsAudioLoopClass

struct AgsAudioLoopClass {
  AgsThreadClass thread;
};

enum AgsAudioLoopFlags

typedef enum {
  AGS_AUDIO_LOOP_PLAY_RECALL                    = 1,
  AGS_AUDIO_LOOP_PLAYING_RECALL                 = 1 << 1,
  AGS_AUDIO_LOOP_PLAY_RECALL_TERMINATING        = 1 << 2,
  AGS_AUDIO_LOOP_PLAY_CHANNEL                   = 1 << 3,
  AGS_AUDIO_LOOP_PLAYING_CHANNEL                = 1 << 4,
  AGS_AUDIO_LOOP_PLAY_CHANNEL_TERMINATING       = 1 << 5,
  AGS_AUDIO_LOOP_PLAY_AUDIO                     = 1 << 6,
  AGS_AUDIO_LOOP_PLAYING_AUDIO                  = 1 << 7,
  AGS_AUDIO_LOOP_PLAY_NOTATION                  = 1 << 8,
  AGS_AUDIO_LOOP_PLAYING_NOTATION               = 1 << 9,
  AGS_AUDIO_LOOP_PLAY_AUDIO_TERMINATING         = 1 << 10,
} AgsAudioLoopFlags;

ags_audio_loop_add_audio ()

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

Add audio for playback.

audio_loop :

the AgsAudioLoop

audio :

an AgsAudio

Since 0.4


ags_audio_loop_add_channel ()

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

Add channel for playback.

audio_loop :

the AgsAudioLoop

channel :

an AgsChannel

Since 0.4


ags_audio_loop_add_recall ()

void                ags_audio_loop_add_recall           (AgsAudioLoop *audio_loop,
                                                         gpointer devout_play);

Add recall for playback.

audio_loop :

the AgsAudioLoop

recall :

an AgsRecall

Since 0.4


ags_audio_loop_new ()

AgsAudioLoop *      ags_audio_loop_new                  (GObject *devout,
                                                         GObject *ags_main);

Create a new AgsAudioLoop.

devout :

the AgsDevout

ags_main :

the AgsMain

Returns :

the new AgsAudioLoop

Since 0.4


ags_audio_loop_remove_audio ()

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

Remove audio of playback.

audio_loop :

the AgsAudioLoop

audio :

an AgsAudio

Since 0.4


ags_audio_loop_remove_channel ()

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

Remove channel of playback.

audio_loop :

the AgsAudioLoop

channel :

an AgsChannel

Since 0.4


ags_audio_loop_remove_recall ()

void                ags_audio_loop_remove_recall        (AgsAudioLoop *audio_loop,
                                                         gpointer devout_play);

Remove recall of playback.

audio_loop :

the AgsAudioLoop

recall :

an AgsRecall

Since 0.4