AgsAlsaDevin

AgsAlsaDevin — Input from soundcard

Stability Level

Stable, unless otherwise indicated

Functions

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
guint pcm-channels Read / Write
guint samplerate Read / Write

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsAlsaDevinFlags
    GObject
    ╰── AgsAlsaDevin

Implemented Interfaces

AgsAlsaDevin implements AgsConnectable and AgsSoundcard.

Includes

#include <ags/audio/ags_alsa_devin.h>

Description

AgsAlsaDevin represents a soundcard and supports input.

Functions

AGS_ALSA_DEVIN_GET_OBJ_MUTEX()

#define AGS_ALSA_DEVIN_GET_OBJ_MUTEX(obj) (&(((AgsAlsaDevin *) obj)->obj_mutex))

ags_alsa_devin_error_quark ()

GQuark
ags_alsa_devin_error_quark ();

ags_alsa_devin_test_flags ()

gboolean
ags_alsa_devin_test_flags (AgsAlsaDevin *alsa_devin,
                           guint flags);

Test flags to be set on alsa_devin .

Parameters

alsa_devin

the AgsAlsaDevin

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.13.2


ags_alsa_devin_set_flags ()

void
ags_alsa_devin_set_flags (AgsAlsaDevin *alsa_devin,
                          guint flags);

Enable a feature of alsa_devin .

Parameters

alsa_devin

the AgsAlsaDevin

 

flags

see AgsAlsaDevinFlags

 

Since: 3.13.2


ags_alsa_devin_unset_flags ()

void
ags_alsa_devin_unset_flags (AgsAlsaDevin *alsa_devin,
                            guint flags);

Disable a feature of alsa_devin .

Parameters

alsa_devin

the AgsAlsaDevin

 

flags

see AgsAlsaDevinFlags

 

Since: 3.13.2


ags_alsa_devin_switch_buffer_flag ()

void
ags_alsa_devin_switch_buffer_flag (AgsAlsaDevin *alsa_devin);

The buffer flag indicates the currently recorded buffer.

Parameters

alsa_devin

the AgsAlsaDevin

 

Since: 3.13.2


ags_alsa_devin_adjust_delay_and_attack ()

void
ags_alsa_devin_adjust_delay_and_attack
                               (AgsAlsaDevin *alsa_devin);

Calculate delay and attack and reset it.

Parameters

alsa_devin

the AgsAlsaDevin

 

Since: 3.13.2


ags_alsa_devin_realloc_buffer ()

void
ags_alsa_devin_realloc_buffer (AgsAlsaDevin *alsa_devin);

Reallocate the internal audio buffer.

Parameters

alsa_devin

the AgsAlsaDevin

 

Since: 3.13.2


ags_alsa_devin_new ()

AgsAlsaDevin *
ags_alsa_devin_new ();

Creates a new instance of AgsAlsaDevin.

Returns

the new AgsAlsaDevin

Since: 3.13.2


AGS_ALSA_DEVIN()

#define AGS_ALSA_DEVIN(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ALSA_DEVIN, AgsAlsaDevin))

AGS_ALSA_DEVIN_CLASS()

#define AGS_ALSA_DEVIN_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_ALSA_DEVIN, AgsAlsaDevin))

AGS_ALSA_DEVIN_GET_CLASS()

#define AGS_ALSA_DEVIN_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_ALSA_DEVIN, AgsAlsaDevinClass))

AGS_IS_ALSA_DEVIN()

#define AGS_IS_ALSA_DEVIN(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ALSA_DEVIN))

AGS_IS_ALSA_DEVIN_CLASS()

#define AGS_IS_ALSA_DEVIN_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ALSA_DEVIN))

ags_alsa_devin_flags_get_type ()

GType
ags_alsa_devin_flags_get_type ();

ags_alsa_devin_get_type ()

GType
ags_alsa_devin_get_type ();

Types and Values

AGS_ALSA_DEVIN_DEFAULT_ALSA_DEVICE

#define AGS_ALSA_DEVIN_DEFAULT_ALSA_DEVICE "hw:0,0"

AGS_ALSA_DEVIN_DEFAULT_APP_BUFFER_SIZE

#define AGS_ALSA_DEVIN_DEFAULT_APP_BUFFER_SIZE (4)

AGS_ALSA_DEVIN_DEFAULT_BACKEND_BUFFER_SIZE

#define AGS_ALSA_DEVIN_DEFAULT_BACKEND_BUFFER_SIZE (8)

enum AgsAlsaDevinFlags

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

Members

AGS_ALSA_DEVIN_INITIALIZED

the soundcard was initialized

 

AGS_ALSA_DEVIN_START_RECORD

capture starting

 

AGS_ALSA_DEVIN_RECORD

do capture

 

AGS_ALSA_DEVIN_SHUTDOWN

stop capture

 

AGS_ALSA_DEVIN_NONBLOCKING

do non-blocking calls

 

AGS_ALSA_DEVIN_ATTACK_FIRST

use first attack, instead of second one

 

enum AgsAlsaDevinAppBufferMode

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

Members

AGS_ALSA_DEVIN_APP_BUFFER_0

ring-buffer 0

 

AGS_ALSA_DEVIN_APP_BUFFER_1

ring-buffer 1

 

AGS_ALSA_DEVIN_APP_BUFFER_2

ring-buffer 2

 

AGS_ALSA_DEVIN_APP_BUFFER_3

ring-buffer 3

 

enum AgsAlsaDevinBackendBufferMode

Enum values to indicate internal state of AgsAlsaDevin backend buffer by setting mode.

Members

AGS_ALSA_DEVIN_BACKEND_BUFFER_0

ring-buffer 0

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_1

ring-buffer 1

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_2

ring-buffer 2

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_3

ring-buffer 3

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_4

ring-buffer 4

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_5

ring-buffer 5

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_6

ring-buffer 6

 

AGS_ALSA_DEVIN_BACKEND_BUFFER_7

ring-buffer 7

 

AGS_ALSA_DEVIN_ERROR

#define AGS_ALSA_DEVIN_ERROR (ags_alsa_devin_error_quark())

enum AgsAlsaDevinError

Members

AGS_ALSA_DEVIN_ERROR_LOCKED_SOUNDCARD

   

AGS_ALSA_DEVIN_ERROR_BROKEN_CONFIGURATION

   

AGS_ALSA_DEVIN_ERROR_ACCESS_TYPE_NOT_AVAILABLE

   

AGS_ALSA_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE

   

AGS_ALSA_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE

   

AGS_ALSA_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE

   

AGS_ALSA_DEVIN_ERROR_BUFFER_SIZE_NOT_AVAILABLE

   

AGS_ALSA_DEVIN_ERROR_HW_PARAMETERS_NOT_AVAILABLE

   

AGS_TYPE_ALSA_DEVIN

#define AGS_TYPE_ALSA_DEVIN                (ags_alsa_devin_get_type())

struct AgsAlsaDevin

struct AgsAlsaDevin;

struct AgsAlsaDevinClass

struct AgsAlsaDevinClass {
  GObjectClass gobject;
};

Property Details

The “attack” property

  “attack”                   gpointer

Attack of the buffer

Owner: AgsAlsaDevin

Flags: Read

Since: 3.13.2


The “bpm” property

  “bpm”                      double

Beats per minute

Owner: AgsAlsaDevin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.13.2


The “buffer” property

  “buffer”                   gpointer

The buffer

Owner: AgsAlsaDevin

Flags: Read

Since: 3.13.2


The “buffer-size” property

  “buffer-size”              guint

The buffer size

Owner: AgsAlsaDevin

Flags: Read / Write

Allowed values: [16,16384]

Default value: 1024

Since: 3.13.2


The “delay-factor” property

  “delay-factor”             double

tact

Owner: AgsAlsaDevin

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.13.2


The “device” property

  “device”                   char *

The alsa soundcard indentifier

Owner: AgsAlsaDevin

Flags: Read / Write

Default value: "hw:0,0"

Since: 3.13.2


The “dsp-channels” property

  “dsp-channels”             guint

The dsp channel count

Owner: AgsAlsaDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.13.2


The “format” property

  “format”                   guint

The precision of the buffer

Owner: AgsAlsaDevin

Flags: Read / Write

Default value: 16

Since: 3.13.2


The “pcm-channels” property

  “pcm-channels”             guint

The pcm channel count

Owner: AgsAlsaDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.13.2


The “samplerate” property

  “samplerate”               guint

The samplerate

Owner: AgsAlsaDevin

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 48000

Since: 3.13.2