## AgsJackDevin

AgsJackDevin — Input from soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_JACK_DEVIN_GET_OBJ_MUTEX()
GQuark | ags_jack_devin_error_quark ()
gboolean | ags_jack_devin_test_flags ()
void | ags_jack_devin_set_flags ()
void | ags_jack_devin_unset_flags ()
void | ags_jack_devin_switch_buffer_flag ()
void | ags_jack_devin_realloc_buffer ()
AgsJackDevin * | ags_jack_devin_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
AgsJackClient * | jack-client | Read / Write
gpointer | jack-port | Read / Write
guint | pcm-channels | Read / Write
guint | samplerate | Read / Write

## Types and Values

enum | AgsJackDevinFlags
enum | AgsJackDevinAppBufferMode
enum | AgsJackDevinSyncFlags
#define | AGS_JACK_DEVIN_ERROR
enum | AgsJackDevinError

## Object Hierarchy

        GFlags
        ╰── AgsJackDevinFlags
        GObject
        ╰── AgsJackDevin

## Includes

    #include <ags/audio/jack/ags_jack_devin.h>

## Description

AgsJackDevin represents a soundcard and supports input.

## Functions

### AGS_JACK_DEVIN_GET_OBJ_MUTEX()

    #define AGS_JACK_DEVIN_GET_OBJ_MUTEX(obj) (&(((AgsJackDevin *) obj)->obj_mutex))

### ags_jack_devin_error_quark ()

    GQuark
    ags_jack_devin_error_quark ();

### ags_jack_devin_test_flags ()

    gboolean
    ags_jack_devin_test_flags (AgsJackDevin *jack_devin,
                               AgsJackDevinFlags flags);

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

#### Parameters

jack_devin | the AgsJackDevin |
flags | the flags |

#### Returns

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

Since: 3.0.0

### ags_jack_devin_set_flags ()

    void
    ags_jack_devin_set_flags (AgsJackDevin *jack_devin,
                              AgsJackDevinFlags flags);

Enable a feature of `jack_devin` .

#### Parameters

jack_devin | the AgsJackDevin |
flags | see AgsJackDevinFlags |

Since: 3.0.0

### ags_jack_devin_unset_flags ()

    void
    ags_jack_devin_unset_flags (AgsJackDevin *jack_devin,
                                AgsJackDevinFlags flags);

Disable a feature of `jack_devin` .

#### Parameters

jack_devin | the AgsJackDevin |
flags | see AgsJackDevinFlags |

Since: 3.0.0

### ags_jack_devin_switch_buffer_flag ()

    void
    ags_jack_devin_switch_buffer_flag (AgsJackDevin *jack_devin);

The buffer flag indicates the currently played buffer.

#### Parameters

jack_devin | an AgsJackDevin |

Since: 3.0.0

### ags_jack_devin_realloc_buffer ()

    void
    ags_jack_devin_realloc_buffer (AgsJackDevin *jack_devin);

Reallocate the internal audio buffer.

#### Parameters

jack_devin | the AgsJackDevin |

Since: 3.0.0

### ags_jack_devin_new ()

    AgsJackDevin *
    ags_jack_devin_new ();

Creates a new instance of AgsJackDevin.

#### Returns

the new AgsJackDevin

Since: 3.0.0

## Types and Values

### enum AgsJackDevinFlags

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

#### Members

AGS_JACK_DEVIN_INITIALIZED | the soundcard was initialized |
AGS_JACK_DEVIN_START_RECORD | capture starting |
AGS_JACK_DEVIN_RECORD | do capture |
AGS_JACK_DEVIN_SHUTDOWN | stop capture |
AGS_JACK_DEVIN_NONBLOCKING | do non-blocking calls |
AGS_JACK_DEVIN_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsJackDevinAppBufferMode

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

#### Members

AGS_JACK_DEVIN_APP_BUFFER_0 | ring-buffer 0 |
AGS_JACK_DEVIN_APP_BUFFER_1 | ring-buffer 1 |
AGS_JACK_DEVIN_APP_BUFFER_2 | ring-buffer 2 |
AGS_JACK_DEVIN_APP_BUFFER_3 | ring-buffer 3 |

### enum AgsJackDevinSyncFlags

Enum values to control the synchronization between soundcard and client.

#### Members

AGS_JACK_DEVIN_PASS_THROUGH | do not sync |
AGS_JACK_DEVIN_INITIAL_CALLBACK | initial callback |
AGS_JACK_DEVIN_CALLBACK_WAIT | sync wait, soundcard conditional lock |
AGS_JACK_DEVIN_CALLBACK_DONE | sync done, soundcard conditional lock |
AGS_JACK_DEVIN_CALLBACK_FINISH_WAIT | sync wait, client conditional lock |
AGS_JACK_DEVIN_CALLBACK_FINISH_DONE | sync done, client conditional lock |

### AGS_JACK_DEVIN_ERROR

    #define AGS_JACK_DEVIN_ERROR (ags_jack_devin_error_quark())

### enum AgsJackDevinError

#### Members

AGS_JACK_DEVIN_ERROR_LOCKED_SOUNDCARD |  |

## Property Details

### The `“bpm”` property

      “bpm”                      double

Beats per minute

Owner: AgsJackDevin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.0.0

### The `“buffer”` property

      “buffer”                   gpointer

The buffer

Owner: AgsJackDevin

Flags: Read

Since: 3.0.0

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

      “buffer-size”              guint

The buffer size

Owner: AgsJackDevin

Flags: Read / Write

Allowed values: [1,44100]

Default value: 940

Since: 3.0.0

### The `“device”` property

      “device”                   char *

The jack soundcard indentifier

Owner: AgsJackDevin

Flags: Read / Write

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

Since: 3.0.0

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

      “dsp-channels”             guint

The dsp channel count

Owner: AgsJackDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.0.0

### The `“format”` property

      “format”                   guint

The precision of the buffer

Owner: AgsJackDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 16

Since: 3.0.0

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

      “jack-client”              AgsJackClient *

The assigned AgsJackClient

Owner: AgsJackDevin

Flags: Read / Write

Since: 3.0.0

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

      “jack-port”                gpointer

The assigned AgsJackPort

Owner: AgsJackDevin

Flags: Read / Write

Since: 3.0.0

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

      “pcm-channels”             guint

The pcm channel count

Owner: AgsJackDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.0.0

### The `“samplerate”` property

      “samplerate”               guint

The samplerate

Owner: AgsJackDevin

Flags: Read / Write

Allowed values: [8000,96000]

Default value: 44100

Since: 3.0.0