## AgsGstreamerDevout

AgsGstreamerDevout — Output to soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_GSTREAMER_DEVOUT_GET_OBJ_MUTEX()
GQuark | ags_gstreamer_devout_error_quark ()
gboolean | ags_gstreamer_devout_test_flags ()
void | ags_gstreamer_devout_set_flags ()
void | ags_gstreamer_devout_unset_flags ()
void | ags_gstreamer_devout_switch_buffer_flag ()
void | ags_gstreamer_devout_realloc_buffer ()
AgsGstreamerDevout * | ags_gstreamer_devout_new ()

## Properties

double | bpm | Read / Write
gpointer | buffer | Read
guint | buffer-size | Read / Write
char * | device | Read / Write
guint | dsp-channels | Read / Write
guint | format | Read / Write
AgsGstreamerClient * | gstreamer-client | Read / Write
gpointer | gstreamer-port | Read / Write
guint | pcm-channels | Read / Write
guint | samplerate | Read / Write

## Types and Values

#define | AGS_GSTREAMER_DEVOUT_DEFAULT_APP_BUFFER_SIZE
enum | AgsGstreamerDevoutFlags
enum | AgsGstreamerDevoutAppBufferMode
enum | AgsGstreamerDevoutSyncFlags
#define | AGS_GSTREAMER_DEVOUT_ERROR
enum | AgsGstreamerDevoutError

## Object Hierarchy

        GFlags
        ╰── AgsGstreamerDevoutFlags
        GObject
        ╰── AgsGstreamerDevout

## Includes

    #include <ags/audio/gstreamer/ags_gstreamer_devout.h>

## Description

AgsGstreamerDevout represents a soundcard and supports output.

## Functions

### AGS_GSTREAMER_DEVOUT_GET_OBJ_MUTEX()

    #define AGS_GSTREAMER_DEVOUT_GET_OBJ_MUTEX(obj) (&(((AgsGstreamerDevout *) obj)->obj_mutex))

### ags_gstreamer_devout_error_quark ()

    GQuark
    ags_gstreamer_devout_error_quark ();

### ags_gstreamer_devout_test_flags ()

    gboolean
    ags_gstreamer_devout_test_flags (AgsGstreamerDevout *gstreamer_devout,
                                     AgsGstreamerDevoutFlags flags);

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

#### Parameters

gstreamer_devout | the AgsGstreamerDevout |
flags | the flags |

#### Returns

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

Since: 3.6.0

### ags_gstreamer_devout_set_flags ()

    void
    ags_gstreamer_devout_set_flags (AgsGstreamerDevout *gstreamer_devout,
                                    AgsGstreamerDevoutFlags flags);

Enable a feature of `gstreamer_devout` .

#### Parameters

gstreamer_devout | the AgsGstreamerDevout |
flags | see AgsGstreamerDevoutFlags |

Since: 3.6.0

### ags_gstreamer_devout_unset_flags ()

    void
    ags_gstreamer_devout_unset_flags (AgsGstreamerDevout *gstreamer_devout,
                                      AgsGstreamerDevoutFlags flags);

Disable a feature of `gstreamer_devout` .

#### Parameters

gstreamer_devout | the AgsGstreamerDevout |
flags | see AgsGstreamerDevoutFlags |

Since: 3.6.0

### ags_gstreamer_devout_switch_buffer_flag ()

    void
    ags_gstreamer_devout_switch_buffer_flag
                                   (AgsGstreamerDevout *gstreamer_devout);

The buffer flag indicates the currently played buffer.

#### Parameters

gstreamer_devout | an AgsGstreamerDevout |

Since: 3.6.0

### ags_gstreamer_devout_realloc_buffer ()

    void
    ags_gstreamer_devout_realloc_buffer (AgsGstreamerDevout *gstreamer_devout);

Reallocate the internal audio buffer.

#### Parameters

gstreamer_devout | the AgsGstreamerDevout |

Since: 3.6.0

### ags_gstreamer_devout_new ()

    AgsGstreamerDevout *
    ags_gstreamer_devout_new ();

Creates a new instance of AgsGstreamerDevout.

#### Returns

the new AgsGstreamerDevout

Since: 3.6.0

## Types and Values

### AGS_GSTREAMER_DEVOUT_DEFAULT_APP_BUFFER_SIZE

    #define AGS_GSTREAMER_DEVOUT_DEFAULT_APP_BUFFER_SIZE (8)

### enum AgsGstreamerDevoutFlags

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

#### Members

AGS_GSTREAMER_DEVOUT_INITIALIZED | the soundcard was initialized |
AGS_GSTREAMER_DEVOUT_START_PLAY | playback starting |
AGS_GSTREAMER_DEVOUT_PLAY | do playback |
AGS_GSTREAMER_DEVOUT_SHUTDOWN | stop playback |
AGS_GSTREAMER_DEVOUT_NONBLOCKING | do non-blocking calls |
AGS_GSTREAMER_DEVOUT_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsGstreamerDevoutAppBufferMode

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

#### Members

AGS_GSTREAMER_DEVOUT_APP_BUFFER_0 | ring-buffer 0 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_1 | ring-buffer 1 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_2 | ring-buffer 2 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_3 | ring-buffer 3 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_4 | ring-buffer 4 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_5 | ring-buffer 5 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_6 | ring-buffer 6 |
AGS_GSTREAMER_DEVOUT_APP_BUFFER_7 | ring-buffer 7 |

### enum AgsGstreamerDevoutSyncFlags

Enum values to control the synchronization between soundcard and client.

#### Members

AGS_GSTREAMER_DEVOUT_PASS_THROUGH | do not sync |
AGS_GSTREAMER_DEVOUT_INITIAL_CALLBACK | initial callback |
AGS_GSTREAMER_DEVOUT_CALLBACK_WAIT | sync wait, soundcard conditional lock |
AGS_GSTREAMER_DEVOUT_CALLBACK_DONE | sync done, soundcard conditional lock |
AGS_GSTREAMER_DEVOUT_CALLBACK_FINISH_WAIT | sync wait, client conditional lock |
AGS_GSTREAMER_DEVOUT_CALLBACK_FINISH_DONE | sync done, client conditional lock |

### AGS_GSTREAMER_DEVOUT_ERROR

    #define AGS_GSTREAMER_DEVOUT_ERROR (ags_gstreamer_devout_error_quark())

### enum AgsGstreamerDevoutError

#### Members

AGS_GSTREAMER_DEVOUT_ERROR_LOCKED_SOUNDCARD |  |

## Property Details

### The `“bpm”` property

      “bpm”                      double

Beats per minute

Owner: AgsGstreamerDevout

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.6.0

### The `“buffer”` property

      “buffer”                   gpointer

The buffer

Owner: AgsGstreamerDevout

Flags: Read

Since: 3.6.0

### The `“buffer-size”` property

      “buffer-size”              guint

The buffer size

Owner: AgsGstreamerDevout

Flags: Read / Write

Allowed values: [16,16384]

Default value: 2048

Since: 3.6.0

### The `“device”` property

      “device”                   char *

The gstreamer soundcard indentifier

Owner: AgsGstreamerDevout

Flags: Read / Write

Default value: "ags-gstreamer-devout-0"

Since: 3.6.0

### The `“dsp-channels”` property

      “dsp-channels”             guint

The dsp channel count

Owner: AgsGstreamerDevout

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.6.0

### The `“format”` property

      “format”                   guint

The precision of the buffer

Owner: AgsGstreamerDevout

Flags: Read / Write

Default value: 16

Since: 3.6.0

### The `“gstreamer-client”` property

      “gstreamer-client”         AgsGstreamerClient *

The assigned AgsGstreamerClient

Owner: AgsGstreamerDevout

Flags: Read / Write

Since: 3.6.0

### The `“gstreamer-port”` property

      “gstreamer-port”           gpointer

The assigned AgsGstreamerPort

Owner: AgsGstreamerDevout

Flags: Read / Write

Since: 3.6.0

### The `“pcm-channels”` property

      “pcm-channels”             guint

The pcm channel count

Owner: AgsGstreamerDevout

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.6.0

### The `“samplerate”` property

      “samplerate”               guint

The samplerate

Owner: AgsGstreamerDevout

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 44100

Since: 3.6.0