## AgsPlayback

AgsPlayback — Outputting channel to soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_PLAYBACK_GET_OBJ_MUTEX()
gboolean | ags_playback_test_flags ()
void | ags_playback_set_flags ()
void | ags_playback_unset_flags ()
void | ags_playback_set_channel_thread ()
AgsThread * | ags_playback_get_channel_thread ()
void | ags_playback_set_recall_id ()
AgsRecallID * | ags_playback_get_recall_id ()
AgsPlayback * | ags_playback_find_channel ()
AgsPlayback * | ags_playback_new ()

## Properties

guint | audio-channel | Read / Write
AgsChannel * | channel | Read / Write
AgsNote * | play-note | Read / Write
AgsPlaybackDomain * | playback-domain | Read / Write

## Types and Values

enum | AgsPlaybackFlags

## Object Hierarchy

        GFlags
        ╰── AgsPlaybackFlags
        GObject
        ╰── AgsPlayback

## Includes

    #include <ags/audio/ags_playback.h>

## Description

AgsPlayback represents a context to output. It provides you the channel processing threads per AgsSoundScope.

The assigned AgsChannelThread calls `ags_channel_recursive_run_stage()` for you.

## Functions

### AGS_PLAYBACK_GET_OBJ_MUTEX()

    #define AGS_PLAYBACK_GET_OBJ_MUTEX(obj) (&(((AgsPlayback *) obj)->obj_mutex))

### ags_playback_test_flags ()

    gboolean
    ags_playback_test_flags (AgsPlayback *playback,
                             AgsPlaybackFlags flags);

Test `flags` to be set on `playback` .

#### Parameters

playback | the AgsPlayback |
flags | the flags |

#### Returns

`TRUE` if flags are set, else `FALSE`

Since: 3.0.0

### ags_playback_set_flags ()

    void
    ags_playback_set_flags (AgsPlayback *playback,
                            AgsPlaybackFlags flags);

Set flags.

#### Parameters

playback | the AgsPlayback |
flags | the flags |

Since: 3.0.0

### ags_playback_unset_flags ()

    void
    ags_playback_unset_flags (AgsPlayback *playback,
                              AgsPlaybackFlags flags);

Unset flags.

#### Parameters

playback | the AgsPlayback |
flags | the flags |

Since: 3.0.0

### ags_playback_set_channel_thread ()

    void
    ags_playback_set_channel_thread (AgsPlayback *playback,
                                     AgsThread *thread,
                                     gint sound_scope);

Set channel thread of appropriate scope.

#### Parameters

playback | the AgsPlayback |
thread | the AgsChannelThread |
sound_scope | the scope of the thread to set |

Since: 3.0.0

### ags_playback_get_channel_thread ()

    AgsThread *
    ags_playback_get_channel_thread (AgsPlayback *playback,
                                     gint sound_scope);

Get channel thread of appropriate scope.

#### Parameters

playback | the AgsPlayback |
sound_scope | the scope of the thread to get |

#### Returns

the matching AgsThread or `NULL`.

[transfer full]

Since: 3.0.0

### ags_playback_set_recall_id ()

    void
    ags_playback_set_recall_id (AgsPlayback *playback,
                                AgsRecallID *recall_id,
                                gint sound_scope);

Set recall id of appropriate scope.

#### Parameters

playback | the AgsPlayback |
recall_id | the AgsRecallID |
sound_scope | the scope of the recall id to set |

Since: 3.0.0

### ags_playback_get_recall_id ()

    AgsRecallID *
    ags_playback_get_recall_id (AgsPlayback *playback,
                                gint sound_scope);

Get recall id of appropriate scope.

#### Parameters

playback | the AgsPlayback |
sound_scope | the scope of the recall id to get |

#### Returns

the matching AgsRecallID or `NULL`.

[transfer full]

Since: 3.0.0

### ags_playback_find_channel ()

    AgsPlayback *
    ags_playback_find_channel (GList *playback,
                               GObject *channel);

Find `channel` in `playback` .

#### Parameters

playback | the GList containing AgsPlayback. | [element-type AgsAudio.Playback][transfer none]
channel | the AgsChannel |

#### Returns

the matching playback.

[transfer none]

Since: 3.0.0

### ags_playback_new ()

    AgsPlayback *
    ags_playback_new (GObject *channel);

Instantiate a playback object and assign `channel` .

#### Parameters

channel | the AgsChannel |

#### Returns

the new AgsPlayback

Since: 3.0.0

## Types and Values

### enum AgsPlaybackFlags

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

#### Members

AGS_PLAYBACK_SINGLE_THREADED | single threaded |
AGS_PLAYBACK_SUPER_THREADED_CHANNEL | super threaded channel |

## Property Details

### The `“audio-channel”` property

      “audio-channel”            guint

The assigned audio channel.

Owner: AgsPlayback

Flags: Read / Write

Default value: 0

Since: 3.0.0

### The `“channel”` property

      “channel”                  AgsChannel *

The assigned channel.

Owner: AgsPlayback

Flags: Read / Write

Since: 3.0.0

### The `“play-note”` property

      “play-note”                AgsNote *

The assigned note.

Owner: AgsPlayback

Flags: Read / Write

Since: 3.0.0

### The `“playback-domain”` property

      “playback-domain”          AgsPlaybackDomain *

The parent playback domain.

Owner: AgsPlayback

Flags: Read / Write

Since: 3.0.0