## AgsCoreAudioDevin

AgsCoreAudioDevin — Input from soundcard

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_CORE_AUDIO_DEVIN_GET_OBJ_MUTEX()
GQuark | ags_core_audio_devin_error_quark ()
gboolean | ags_core_audio_devin_test_flags ()
void | ags_core_audio_devin_set_flags ()
void | ags_core_audio_devin_unset_flags ()
void | ags_core_audio_devin_switch_buffer_flag ()
void | ags_core_audio_devin_realloc_buffer ()
AgsCoreAudioDevin * | ags_core_audio_devin_new ()

## Properties

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

## Types and Values

#define | AGS_CORE_AUDIO_DEVIN_DEFAULT_APP_BUFFER_SIZE
enum | AgsCoreAudioDevinFlags
enum | AgsCoreAudioDevinAppBufferMode
enum | AgsCoreAudioDevinSyncFlags
#define | AGS_CORE_AUDIO_DEVIN_ERROR
enum | AgsCoreAudioDevinError

## Object Hierarchy

        GFlags
        ╰── AgsCoreAudioDevinFlags
        GObject
        ╰── AgsCoreAudioDevin

## Includes

    #include <ags/audio/core-audio/ags_core_audio_devin.h>

## Description

AgsCoreAudioDevin represents a soundcard and supports output.

## Functions

### AGS_CORE_AUDIO_DEVIN_GET_OBJ_MUTEX()

    #define AGS_CORE_AUDIO_DEVIN_GET_OBJ_MUTEX(obj) (&(((AgsCoreAudioDevin *) obj)->obj_mutex))

### ags_core_audio_devin_error_quark ()

    GQuark
    ags_core_audio_devin_error_quark ();

### ags_core_audio_devin_test_flags ()

    gboolean
    ags_core_audio_devin_test_flags (AgsCoreAudioDevin *core_audio_devin,
                                     AgsCoreAudioDevinFlags flags);

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

#### Parameters

core_audio_devin | the AgsCoreAudioDevin |
flags | the flags |

#### Returns

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

Since: 3.0.0

### ags_core_audio_devin_set_flags ()

    void
    ags_core_audio_devin_set_flags (AgsCoreAudioDevin *core_audio_devin,
                                    AgsCoreAudioDevinFlags flags);

Enable a feature of `core_audio_devin` .

#### Parameters

core_audio_devin | the AgsCoreAudioDevin |
flags | see AgsCoreAudioDevinFlags |

Since: 3.0.0

### ags_core_audio_devin_unset_flags ()

    void
    ags_core_audio_devin_unset_flags (AgsCoreAudioDevin *core_audio_devin,
                                      AgsCoreAudioDevinFlags flags);

Disable a feature of `core_audio_devin` .

#### Parameters

core_audio_devin | the AgsCoreAudioDevin |
flags | see AgsCoreAudioDevinFlags |

Since: 3.0.0

### ags_core_audio_devin_switch_buffer_flag ()

    void
    ags_core_audio_devin_switch_buffer_flag
                                   (AgsCoreAudioDevin *core_audio_devin);

The buffer flag indicates the currently played buffer.

#### Parameters

core_audio_devin | an AgsCoreAudioDevin |

Since: 3.0.0

### ags_core_audio_devin_realloc_buffer ()

    void
    ags_core_audio_devin_realloc_buffer (AgsCoreAudioDevin *core_audio_devin);

Reallocate the internal audio buffer.

#### Parameters

core_audio_devin | the AgsCoreAudioDevin |

Since: 3.0.0

### ags_core_audio_devin_new ()

    AgsCoreAudioDevin *
    ags_core_audio_devin_new ();

Creates a new instance of AgsCoreAudioDevin.

#### Returns

a new AgsCoreAudioDevin

Since: 3.0.0

## Types and Values

### AGS_CORE_AUDIO_DEVIN_DEFAULT_APP_BUFFER_SIZE

    #define AGS_CORE_AUDIO_DEVIN_DEFAULT_APP_BUFFER_SIZE (8)

### enum AgsCoreAudioDevinFlags

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

#### Members

AGS_CORE_AUDIO_DEVIN_INITIALIZED | the soundcard was initialized |
AGS_CORE_AUDIO_DEVIN_START_RECORD | capture starting |
AGS_CORE_AUDIO_DEVIN_RECORD | do capture |
AGS_CORE_AUDIO_DEVIN_SHUTDOWN | stop capture |
AGS_CORE_AUDIO_DEVIN_NONBLOCKING | do non-blocking calls |
AGS_CORE_AUDIO_DEVIN_ATTACK_FIRST | use first attack, instead of second one |

### enum AgsCoreAudioDevinAppBufferMode

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

#### Members

AGS_CORE_AUDIO_DEVIN_APP_BUFFER_0 | ring-buffer 0 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_1 | ring-buffer 1 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_2 | ring-buffer 2 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_3 | ring-buffer 3 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_4 | ring-buffer 4 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_5 | ring-buffer 5 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_6 | ring-buffer 6 |
AGS_CORE_AUDIO_DEVIN_APP_BUFFER_7 | ring-buffer 7 |

### enum AgsCoreAudioDevinSyncFlags

Enum values to control the synchronization between soundcard and client.

#### Members

AGS_CORE_AUDIO_DEVIN_PASS_THROUGH | do not sync |
AGS_CORE_AUDIO_DEVIN_INITIAL_CALLBACK | initial callback |
AGS_CORE_AUDIO_DEVIN_CALLBACK_WAIT | sync wait, soundcard conditional lock |
AGS_CORE_AUDIO_DEVIN_CALLBACK_DONE | sync done, soundcard conditional lock |
AGS_CORE_AUDIO_DEVIN_CALLBACK_FINISH_WAIT | sync wait, client conditional lock |
AGS_CORE_AUDIO_DEVIN_CALLBACK_FINISH_DONE | sync done, client conditional lock |
AGS_CORE_AUDIO_DEVIN_PRE_SYNC_DEVICE_WAIT | device initial sync wait |
AGS_CORE_AUDIO_DEVIN_PRE_SYNC_DEVICE_DONE | device initial sync done |
AGS_CORE_AUDIO_DEVIN_PRE_SYNC_CALLBACK_WAIT | callback initial sync wait |
AGS_CORE_AUDIO_DEVIN_PRE_SYNC_CALLBACK_DONE | callback initial sync done |

### AGS_CORE_AUDIO_DEVIN_ERROR

    #define AGS_CORE_AUDIO_DEVIN_ERROR (ags_core_audio_devin_error_quark())

### enum AgsCoreAudioDevinError

#### Members

AGS_CORE_AUDIO_DEVIN_ERROR_LOCKED_SOUNDCARD |  |

## Property Details

### The `“bpm”` property

      “bpm”                      double

Beats per minute

Owner: AgsCoreAudioDevin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.0.0

### The `“buffer”` property

      “buffer”                   gpointer

The buffer

Owner: AgsCoreAudioDevin

Flags: Read

Since: 3.0.0

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

      “buffer-size”              guint

The buffer size

Owner: AgsCoreAudioDevin

Flags: Read / Write

Allowed values: [16,16384]

Default value: 2048

Since: 3.0.0

### The `“core-audio-client”` property

      “core-audio-client”        AgsCoreAudioClient *

The assigned AgsCoreAudioClient

Owner: AgsCoreAudioDevin

Flags: Read / Write

Since: 3.0.0

### The `“core-audio-port”` property

      “core-audio-port”          gpointer

The assigned AgsCoreAudioPort

Owner: AgsCoreAudioDevin

Flags: Read / Write

Since: 3.0.0

### The `“device”` property

      “device”                   char *

The core audio soundcard indentifier

Owner: AgsCoreAudioDevin

Flags: Read / Write

Default value: "ags-core-audio-devin-0"

Since: 3.0.0

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

      “dsp-channels”             guint

The dsp channel count

Owner: AgsCoreAudioDevin

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

Flags: Read / Write

Allowed values: >= 1

Default value: 4294967280

Since: 3.0.0

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

      “pcm-channels”             guint

The pcm channel count

Owner: AgsCoreAudioDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.0.0

### The `“samplerate”` property

      “samplerate”               guint

The samplerate

Owner: AgsCoreAudioDevin

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 44100

Since: 3.0.0