## AgsJackDevout

AgsJackDevout — Output to soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_JACK_DEVOUT_GET_OBJ_MUTEX()
GQuark | ags_jack_devout_error_quark ()
gboolean | ags_jack_devout_test_flags ()
void | ags_jack_devout_set_flags ()
void | ags_jack_devout_unset_flags ()
void | ags_jack_devout_switch_buffer_flag ()
void | ags_jack_devout_adjust_delay_and_attack ()
void | ags_jack_devout_realloc_buffer ()
AgsJackDevout * | ags_jack_devout_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
AgsJackClient * | jack-client | Read / Write
gpointer | jack-port | Read / Write
guint | pcm-channels | Read / Write
guint | samplerate | Read / Write

## Types and Values

#define | AGS_JACK_DEVOUT_DEFAULT_APP_BUFFER_SIZE
enum | AgsJackDevoutFlags
enum | AgsJackDevoutAppBufferMode
enum | AgsJackDevoutSyncFlags
#define | AGS_JACK_DEVOUT_ERROR
enum | AgsJackDevoutError

## Object Hierarchy

        GFlags
        ╰── AgsJackDevoutFlags
        GObject
        ╰── AgsJackDevout

## Includes

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

## Description

AgsJackDevout represents a soundcard and supports output.

## Functions

### AGS_JACK_DEVOUT_GET_OBJ_MUTEX()

    #define AGS_JACK_DEVOUT_GET_OBJ_MUTEX(obj) (&(((AgsJackDevout *) obj)->obj_mutex))

### ags_jack_devout_error_quark ()

    GQuark
    ags_jack_devout_error_quark ();

### ags_jack_devout_test_flags ()

    gboolean
    ags_jack_devout_test_flags (AgsJackDevout *jack_devout,
                                AgsJackDevoutFlags flags);

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

#### Parameters

jack_devout | the AgsJackDevout |
flags | the flags |

#### Returns

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

Since: 3.0.0

### ags_jack_devout_set_flags ()

    void
    ags_jack_devout_set_flags (AgsJackDevout *jack_devout,
                               AgsJackDevoutFlags flags);

Enable a feature of `jack_devout` .

#### Parameters

jack_devout | the AgsJackDevout |
flags | see AgsJackDevoutFlags |

Since: 3.0.0

### ags_jack_devout_unset_flags ()

    void
    ags_jack_devout_unset_flags (AgsJackDevout *jack_devout,
                                 AgsJackDevoutFlags flags);

Disable a feature of `jack_devout` .

#### Parameters

jack_devout | the AgsJackDevout |
flags | see AgsJackDevoutFlags |

Since: 3.0.0

### ags_jack_devout_switch_buffer_flag ()

    void
    ags_jack_devout_switch_buffer_flag (AgsJackDevout *jack_devout);

The buffer flag indicates the currently played buffer.

#### Parameters

jack_devout | an AgsJackDevout |

Since: 3.0.0

### ags_jack_devout_adjust_delay_and_attack ()

    void
    ags_jack_devout_adjust_delay_and_attack
                                   (AgsJackDevout *jack_devout);

Calculate delay and attack and reset it.

#### Parameters

jack_devout | the AgsJackDevout |

Since: 3.0.0

### ags_jack_devout_realloc_buffer ()

    void
    ags_jack_devout_realloc_buffer (AgsJackDevout *jack_devout);

Reallocate the internal audio buffer.

#### Parameters

jack_devout | the AgsJackDevout |

Since: 3.0.0

### ags_jack_devout_new ()

    AgsJackDevout *
    ags_jack_devout_new ();

Creates a new instance of AgsJackDevout.

#### Returns

the new AgsJackDevout

Since: 3.0.0

## Types and Values

### AGS_JACK_DEVOUT_DEFAULT_APP_BUFFER_SIZE

    #define AGS_JACK_DEVOUT_DEFAULT_APP_BUFFER_SIZE (4)

### enum AgsJackDevoutFlags

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

#### Members

AGS_JACK_DEVOUT_INITIALIZED | the soundcard was initialized |
AGS_JACK_DEVOUT_START_PLAY | playback starting |
AGS_JACK_DEVOUT_PLAY | do playback |
AGS_JACK_DEVOUT_SHUTDOWN | stop playback |
AGS_JACK_DEVOUT_NONBLOCKING | do non-blocking calls |
AGS_JACK_DEVOUT_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsJackDevoutAppBufferMode

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

#### Members

AGS_JACK_DEVOUT_APP_BUFFER_0 | ring-buffer 0 |
AGS_JACK_DEVOUT_APP_BUFFER_1 | ring-buffer 1 |
AGS_JACK_DEVOUT_APP_BUFFER_2 | ring-buffer 2 |
AGS_JACK_DEVOUT_APP_BUFFER_3 | ring-buffer 3 |

### enum AgsJackDevoutSyncFlags

Enum values to control the synchronization between soundcard and client.

#### Members

AGS_JACK_DEVOUT_PASS_THROUGH | do not sync |
AGS_JACK_DEVOUT_INITIAL_CALLBACK | initial callback |
AGS_JACK_DEVOUT_CALLBACK_WAIT | sync wait, soundcard conditional lock |
AGS_JACK_DEVOUT_CALLBACK_DONE | sync done, soundcard conditional lock |
AGS_JACK_DEVOUT_CALLBACK_FINISH_WAIT | sync wait, client conditional lock |
AGS_JACK_DEVOUT_CALLBACK_FINISH_DONE | sync done, client conditional lock |

### AGS_JACK_DEVOUT_ERROR

    #define AGS_JACK_DEVOUT_ERROR (ags_jack_devout_error_quark())

### enum AgsJackDevoutError

#### Members

AGS_JACK_DEVOUT_ERROR_LOCKED_SOUNDCARD |  |

## Property Details

### The `“attack”` property

      “attack”                   gpointer

Attack of the buffer

Owner: AgsJackDevout

Flags: Read

Since: 3.0.0

### The `“bpm”` property

      “bpm”                      double

Beats per minute

Owner: AgsJackDevout

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.0.0

### The `“buffer”` property

      “buffer”                   gpointer

The buffer

Owner: AgsJackDevout

Flags: Read

Since: 3.0.0

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

      “buffer-size”              guint

The buffer size

Owner: AgsJackDevout

Flags: Read / Write

Allowed values: [16,16384]

Default value: 2048

Since: 3.0.0

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

      “delay-factor”             double

tact

Owner: AgsJackDevout

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.0.0

### The `“device”` property

      “device”                   char *

The jack soundcard indentifier

Owner: AgsJackDevout

Flags: Read / Write

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

Since: 3.0.0

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

      “dsp-channels”             guint

The dsp channel count

Owner: AgsJackDevout

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

Flags: Read / Write

Default value: 16

Since: 3.0.0

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

      “jack-client”              AgsJackClient *

The assigned AgsJackClient

Owner: AgsJackDevout

Flags: Read / Write

Since: 3.0.0

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

      “jack-port”                gpointer

The assigned AgsJackPort

Owner: AgsJackDevout

Flags: Read / Write

Since: 3.0.0

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

      “pcm-channels”             guint

The pcm channel count

Owner: AgsJackDevout

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.0.0

### The `“samplerate”` property

      “samplerate”               guint

The samplerate

Owner: AgsJackDevout

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 44100

Since: 3.0.0