## AgsAudioUnitDevout

AgsAudioUnitDevout — Output to soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_AUDIO_UNIT_DEVOUT_GET_OBJ_MUTEX()
GQuark | ags_audio_unit_devout_error_quark ()
gboolean | ags_audio_unit_devout_test_flags ()
void | ags_audio_unit_devout_set_flags ()
void | ags_audio_unit_devout_unset_flags ()
void | ags_audio_unit_devout_switch_buffer_flag ()
void | ags_audio_unit_devout_realloc_buffer ()
AgsAudioUnitDevout * | ags_audio_unit_devout_new ()

## Types and Values

#define | AGS_AUDIO_UNIT_DEVOUT_DEFAULT_APP_BUFFER_SIZE
enum | AgsAudioUnitDevoutFlags
enum | AgsAudioUnitDevoutAppBufferMode
enum | AgsAudioUnitDevoutSyncFlags
#define | AGS_AUDIO_UNIT_DEVOUT_ERROR
enum | AgsAudioUnitDevoutError

## Includes

    #include <ags/audio/audio-unit/ags_audio_unit_devout.h>

## Description

AgsAudioUnitDevout represents a soundcard and supports output.

## Functions

### AGS_AUDIO_UNIT_DEVOUT_GET_OBJ_MUTEX()

    #define AGS_AUDIO_UNIT_DEVOUT_GET_OBJ_MUTEX(obj) (&(((AgsAudioUnitDevout *) obj)->obj_mutex))

### ags_audio_unit_devout_error_quark ()

    GQuark
    ags_audio_unit_devout_error_quark ();

### ags_audio_unit_devout_test_flags ()

    gboolean
    ags_audio_unit_devout_test_flags (AgsAudioUnitDevout *audio_unit_devout,
                                      AgsAudioUnitDevoutFlags flags);

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

#### Parameters

audio_unit_devout | the AgsAudioUnitDevout |
flags | the flags |

#### Returns

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

Since: 3.0.0

### ags_audio_unit_devout_set_flags ()

    void
    ags_audio_unit_devout_set_flags (AgsAudioUnitDevout *audio_unit_devout,
                                     AgsAudioUnitDevoutFlags flags);

Enable a feature of `audio_unit_devout` .

#### Parameters

audio_unit_devout | the AgsAudioUnitDevout |
flags | see AgsAudioUnitDevoutFlags |

Since: 3.0.0

### ags_audio_unit_devout_unset_flags ()

    void
    ags_audio_unit_devout_unset_flags (AgsAudioUnitDevout *audio_unit_devout,
                                       AgsAudioUnitDevoutFlags flags);

Disable a feature of `audio_unit_devout` .

#### Parameters

audio_unit_devout | the AgsAudioUnitDevout |
flags | see AgsAudioUnitDevoutFlags |

Since: 3.0.0

### ags_audio_unit_devout_switch_buffer_flag ()

    void
    ags_audio_unit_devout_switch_buffer_flag
                                   (AgsAudioUnitDevout *audio_unit_devout);

The buffer flag indicates the currently played buffer.

#### Parameters

audio_unit_devout | an AgsAudioUnitDevout |

Since: 3.0.0

### ags_audio_unit_devout_realloc_buffer ()

    void
    ags_audio_unit_devout_realloc_buffer (AgsAudioUnitDevout *audio_unit_devout);

Reallocate the internal audio buffer.

#### Parameters

audio_unit_devout | the AgsAudioUnitDevout |

Since: 3.0.0

### ags_audio_unit_devout_new ()

    AgsAudioUnitDevout *
    ags_audio_unit_devout_new ();

Creates a new instance of AgsAudioUnitDevout.

#### Returns

a new AgsAudioUnitDevout

Since: 3.0.0

## Types and Values

### AGS_AUDIO_UNIT_DEVOUT_DEFAULT_APP_BUFFER_SIZE

    #define AGS_AUDIO_UNIT_DEVOUT_DEFAULT_APP_BUFFER_SIZE (8)

### enum AgsAudioUnitDevoutFlags

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

#### Members

AGS_AUDIO_UNIT_DEVOUT_INITIALIZED | the soundcard was initialized |
AGS_AUDIO_UNIT_DEVOUT_START_PLAY | playback starting |
AGS_AUDIO_UNIT_DEVOUT_PLAY | do playback |
AGS_AUDIO_UNIT_DEVOUT_SHUTDOWN | stop playback |
AGS_AUDIO_UNIT_DEVOUT_NONBLOCKING | do non-blocking calls |
AGS_AUDIO_UNIT_DEVOUT_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsAudioUnitDevoutAppBufferMode

Enum values to indicate internal state of AgsAudioUnitDevout application buffer by setting mode.

#### Members

AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_0 | ring-buffer 0 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_1 | ring-buffer 1 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_2 | ring-buffer 2 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_3 | ring-buffer 3 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_4 | ring-buffer 4 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_5 | ring-buffer 5 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_6 | ring-buffer 6 |
AGS_AUDIO_UNIT_DEVOUT_APP_BUFFER_7 | ring-buffer 7 |

### enum AgsAudioUnitDevoutSyncFlags

Enum values to control the synchronization between soundcard and client.

#### Members

AGS_AUDIO_UNIT_DEVOUT_PASS_THROUGH | do not sync |
AGS_AUDIO_UNIT_DEVOUT_INITIAL_CALLBACK | initial callback |
AGS_AUDIO_UNIT_DEVOUT_CALLBACK_WAIT | sync wait, soundcard conditional lock |
AGS_AUDIO_UNIT_DEVOUT_CALLBACK_DONE | sync done, soundcard conditional lock |
AGS_AUDIO_UNIT_DEVOUT_CALLBACK_FINISH_WAIT | sync wait, client conditional lock |
AGS_AUDIO_UNIT_DEVOUT_CALLBACK_FINISH_DONE | sync done, client conditional lock |

### AGS_AUDIO_UNIT_DEVOUT_ERROR

    #define AGS_AUDIO_UNIT_DEVOUT_ERROR (ags_audio_unit_devout_error_quark())

### enum AgsAudioUnitDevoutError

#### Members

AGS_AUDIO_UNIT_DEVOUT_ERROR_LOCKED_SOUNDCARD |  |