## AgsGstreamerDevin

AgsGstreamerDevin — Input from soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_GSTREAMER_DEVIN_GET_OBJ_MUTEX()
GQuark | ags_gstreamer_devin_error_quark ()
gboolean | ags_gstreamer_devin_test_flags ()
void | ags_gstreamer_devin_set_flags ()
void | ags_gstreamer_devin_unset_flags ()
void | ags_gstreamer_devin_switch_buffer_flag ()
void | ags_gstreamer_devin_adjust_delay_and_attack ()
void | ags_gstreamer_devin_realloc_buffer ()
AgsGstreamerDevin * | ags_gstreamer_devin_new ()

## Properties

gpointer | attack | Read
double | bpm | Read / Write
gpointer | buffer | Read
guint | buffer-size | Read / Write
double | delay-factor | 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_DEVIN_DEFAULT_APP_BUFFER_SIZE
enum | AgsGstreamerDevinFlags
enum | AgsGstreamerDevinAppBufferMode
enum | AgsGstreamerDevinSyncFlags
#define | AGS_GSTREAMER_DEVIN_ERROR
enum | AgsGstreamerDevinError

## Object Hierarchy

        GFlags
        ╰── AgsGstreamerDevinFlags
        GObject
        ╰── AgsGstreamerDevin

## Includes

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

## Description

AgsGstreamerDevin represents a soundcard and supports input.

## Functions

### AGS_GSTREAMER_DEVIN_GET_OBJ_MUTEX()

    #define AGS_GSTREAMER_DEVIN_GET_OBJ_MUTEX(obj) (&(((AgsGstreamerDevin *) obj)->obj_mutex))

### ags_gstreamer_devin_error_quark ()

    GQuark
    ags_gstreamer_devin_error_quark ();

### ags_gstreamer_devin_test_flags ()

    gboolean
    ags_gstreamer_devin_test_flags (AgsGstreamerDevin *gstreamer_devin,
                                    AgsGstreamerDevinFlags flags);

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

#### Parameters

gstreamer_devin | the AgsGstreamerDevin |
flags | the flags |

#### Returns

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

Since: 3.6.0

### ags_gstreamer_devin_set_flags ()

    void
    ags_gstreamer_devin_set_flags (AgsGstreamerDevin *gstreamer_devin,
                                   AgsGstreamerDevinFlags flags);

Enable a feature of `gstreamer_devin` .

#### Parameters

gstreamer_devin | the AgsGstreamerDevin |
flags | see AgsGstreamerDevinFlags |

Since: 3.6.0

### ags_gstreamer_devin_unset_flags ()

    void
    ags_gstreamer_devin_unset_flags (AgsGstreamerDevin *gstreamer_devin,
                                     AgsGstreamerDevinFlags flags);

Disable a feature of `gstreamer_devin` .

#### Parameters

gstreamer_devin | the AgsGstreamerDevin |
flags | see AgsGstreamerDevinFlags |

Since: 3.6.0

### ags_gstreamer_devin_switch_buffer_flag ()

    void
    ags_gstreamer_devin_switch_buffer_flag
                                   (AgsGstreamerDevin *gstreamer_devin);

The buffer flag indicates the currently played buffer.

#### Parameters

gstreamer_devin | an AgsGstreamerDevin |

Since: 3.6.0

### ags_gstreamer_devin_adjust_delay_and_attack ()

    void
    ags_gstreamer_devin_adjust_delay_and_attack
                                   (AgsGstreamerDevin *gstreamer_devin);

Calculate delay and attack and reset it.

#### Parameters

gstreamer_devin | the AgsGstreamerDevin |

Since: 3.6.0

### ags_gstreamer_devin_realloc_buffer ()

    void
    ags_gstreamer_devin_realloc_buffer (AgsGstreamerDevin *gstreamer_devin);

Reallocate the internal audio buffer.

#### Parameters

gstreamer_devin | the AgsGstreamerDevin |

Since: 3.6.0

### ags_gstreamer_devin_new ()

    AgsGstreamerDevin *
    ags_gstreamer_devin_new ();

Creates a new instance of AgsGstreamerDevin.

#### Returns

the new AgsGstreamerDevin

Since: 3.6.0

## Types and Values

### AGS_GSTREAMER_DEVIN_DEFAULT_APP_BUFFER_SIZE

    #define AGS_GSTREAMER_DEVIN_DEFAULT_APP_BUFFER_SIZE (8)

### enum AgsGstreamerDevinFlags

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

#### Members

AGS_GSTREAMER_DEVIN_INITIALIZED | the soundcard was initialized |
AGS_GSTREAMER_DEVIN_START_RECORD | capture starting |
AGS_GSTREAMER_DEVIN_RECORD | do capture |
AGS_GSTREAMER_DEVIN_SHUTDOWN | stop capture |
AGS_GSTREAMER_DEVIN_NONBLOCKING | do non-blocking calls |
AGS_GSTREAMER_DEVIN_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsGstreamerDevinAppBufferMode

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

#### Members

AGS_GSTREAMER_DEVIN_APP_BUFFER_0 | ring-buffer 0 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_1 | ring-buffer 1 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_2 | ring-buffer 2 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_3 | ring-buffer 3 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_4 | ring-buffer 4 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_5 | ring-buffer 5 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_6 | ring-buffer 6 |
AGS_GSTREAMER_DEVIN_APP_BUFFER_7 | ring-buffer 7 |

### enum AgsGstreamerDevinSyncFlags

Enum values to control the synchronization between soundcard and client.

#### Members

AGS_GSTREAMER_DEVIN_PASS_THROUGH | do not sync |
AGS_GSTREAMER_DEVIN_INITIAL_CALLBACK | initial callback |
AGS_GSTREAMER_DEVIN_CALLBACK_WAIT | sync wait, soundcard conditional lock |
AGS_GSTREAMER_DEVIN_CALLBACK_DONE | sync done, soundcard conditional lock |
AGS_GSTREAMER_DEVIN_CALLBACK_FINISH_WAIT | sync wait, client conditional lock |
AGS_GSTREAMER_DEVIN_CALLBACK_FINISH_DONE | sync done, client conditional lock |

### AGS_GSTREAMER_DEVIN_ERROR

    #define AGS_GSTREAMER_DEVIN_ERROR (ags_gstreamer_devin_error_quark())

### enum AgsGstreamerDevinError

#### Members

AGS_GSTREAMER_DEVIN_ERROR_LOCKED_SOUNDCARD |  |

## Property Details

### The `“attack”` property

      “attack”                   gpointer

Attack of the buffer

Owner: AgsGstreamerDevin

Flags: Read

Since: 3.6.0

### The `“bpm”` property

      “bpm”                      double

Beats per minute

Owner: AgsGstreamerDevin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.6.0

### The `“buffer”` property

      “buffer”                   gpointer

The buffer

Owner: AgsGstreamerDevin

Flags: Read

Since: 3.6.0

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

      “buffer-size”              guint

The buffer size

Owner: AgsGstreamerDevin

Flags: Read / Write

Allowed values: [1,44100]

Default value: 940

Since: 3.6.0

### The `“delay-factor”` property

      “delay-factor”             double

tact

Owner: AgsGstreamerDevin

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.6.0

### The `“device”` property

      “device”                   char *

The gstreamer soundcard indentifier

Owner: AgsGstreamerDevin

Flags: Read / Write

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

Since: 3.6.0

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

      “dsp-channels”             guint

The dsp channel count

Owner: AgsGstreamerDevin

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: AgsGstreamerDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 16

Since: 3.6.0

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

      “gstreamer-client”         AgsGstreamerClient *

The assigned AgsGstreamerClient

Owner: AgsGstreamerDevin

Flags: Read / Write

Since: 3.6.0

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

      “gstreamer-port”           gpointer

The assigned AgsGstreamerPort

Owner: AgsGstreamerDevin

Flags: Read / Write

Since: 3.6.0

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

      “pcm-channels”             guint

The pcm channel count

Owner: AgsGstreamerDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.6.0

### The `“samplerate”` property

      “samplerate”               guint

The samplerate

Owner: AgsGstreamerDevin

Flags: Read / Write

Allowed values: [8000,96000]

Default value: 44100

Since: 3.6.0