krähemann.com

AgsDevin

AgsDevin — Input from soundcard

Properties

gpointer attack Read
gdouble bpm Read / Write
gpointer buffer Read
guint buffer-size Read / Write
gdouble delay-factor Read / Write
gchar * device Read / Write
guint dsp-channels Read / Write
guint format Read / Write
guint pcm-channels Read / Write
guint samplerate Read / Write

Object Hierarchy

    GObject
    ╰── AgsDevin

Implemented Interfaces

AgsDevin implements AgsConnectable and AgsSoundcard.

Includes

#include <ags/audio/ags_devin.h>

Description

AgsDevin represents a soundcard and supports input.

Functions

AGS_DEVIN_GET_OBJ_MUTEX()

#define AGS_DEVIN_GET_OBJ_MUTEX(obj) (&(((AgsDevin *) obj)->obj_mutex))

ags_devin_error_quark ()

GQuark
ags_devin_error_quark ();

ags_devin_test_flags ()

gboolean
ags_devin_test_flags (AgsDevin *devin,
                      guint flags);

Test flags to be set on devin .

Parameters

devin

the AgsDevin

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_devin_set_flags ()

void
ags_devin_set_flags (AgsDevin *devin,
                     guint flags);

Enable a feature of devin .

Parameters

devin

the AgsDevin

 

flags

see AgsDevinFlags

 

Since: 3.0.0


ags_devin_unset_flags ()

void
ags_devin_unset_flags (AgsDevin *devin,
                       guint flags);

Disable a feature of devin .

Parameters

devin

the AgsDevin

 

flags

see AgsDevinFlags

 

Since: 3.0.0


ags_devin_switch_buffer_flag ()

void
ags_devin_switch_buffer_flag (AgsDevin *devin);

The buffer flag indicates the currently recorded buffer.

Parameters

devin

the AgsDevin

 

Since: 3.0.0


ags_devin_adjust_delay_and_attack ()

void
ags_devin_adjust_delay_and_attack (AgsDevin *devin);

Calculate delay and attack and reset it.

Parameters

devin

the AgsDevin

 

Since: 3.0.0


ags_devin_realloc_buffer ()

void
ags_devin_realloc_buffer (AgsDevin *devin);

Reallocate the internal audio buffer.

Parameters

devin

the AgsDevin

 

Since: 3.0.0


ags_devin_new ()

AgsDevin *
ags_devin_new ();

Creates a new instance of AgsDevin.

Returns

the new AgsDevin

Since: 3.0.0


AGS_DEVIN()

#define AGS_DEVIN(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_DEVIN, AgsDevin))

AGS_DEVIN_CLASS()

#define AGS_DEVIN_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_DEVIN, AgsDevin))

AGS_DEVIN_GET_CLASS()

#define AGS_DEVIN_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_DEVIN, AgsDevinClass))

AGS_IS_DEVIN()

#define AGS_IS_DEVIN(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_DEVIN))

ags_devin_get_type ()

GType
ags_devin_get_type ();

Types and Values

AGS_DEVIN_DEFAULT_ALSA_DEVICE

#define AGS_DEVIN_DEFAULT_ALSA_DEVICE "hw:0,0"

AGS_DEVIN_DEFAULT_OSS_DEVICE

#define AGS_DEVIN_DEFAULT_OSS_DEVICE "/dev/dsp"

AGS_DEVIN_DEFAULT_RING_BUFFER_SIZE

#define AGS_DEVIN_DEFAULT_RING_BUFFER_SIZE (8)

enum AgsDevinFlags

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

Members

AGS_DEVIN_ADDED_TO_REGISTRY

the devin was added to registry, see AgsConnectable::add_to_registry()

 

AGS_DEVIN_CONNECTED

indicates the devin was connected by calling AgsConnectable::connect()

 

AGS_DEVIN_BUFFER0

ring-buffer 0

 

AGS_DEVIN_BUFFER1

ring-buffer 1

 

AGS_DEVIN_BUFFER2

ring-buffer 2

 

AGS_DEVIN_BUFFER3

ring-buffer 3

 

AGS_DEVIN_ATTACK_FIRST

use first attack, instead of second one

 

AGS_DEVIN_RECORD

do capture

 

AGS_DEVIN_OSS

use OSS4 backend

 

AGS_DEVIN_ALSA

use ALSA backend

 

AGS_DEVIN_SHUTDOWN

stop capture

 

AGS_DEVIN_START_RECORD

capture starting

 

AGS_DEVIN_NONBLOCKING

do non-blocking calls

 

AGS_DEVIN_INITIALIZED

the soundcard was initialized

 

AGS_DEVIN_ERROR

#define AGS_DEVIN_ERROR (ags_devin_error_quark())

enum AgsDevinError

Members

AGS_DEVIN_ERROR_LOCKED_SOUNDCARD

   

AGS_DEVIN_ERROR_BROKEN_CONFIGURATION

   

AGS_DEVIN_ERROR_ACCESS_TYPE_NOT_AVAILABLE

   

AGS_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE

   

AGS_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE

   

AGS_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE

   

AGS_DEVIN_ERROR_BUFFER_SIZE_NOT_AVAILABLE

   

AGS_DEVIN_ERROR_HW_PARAMETERS_NOT_AVAILABLE

   

AGS_TYPE_DEVIN

#define AGS_TYPE_DEVIN                (ags_devin_get_type())

struct AgsDevin

struct AgsDevin;

struct AgsDevinClass

struct AgsDevinClass {
  GObjectClass gobject;
};

Property Details

The “attack” property

  “attack”                   gpointer

Attack of the buffer

Owner: AgsDevin

Flags: Read

Since: 3.0.0


The “bpm” property

  “bpm”                      gdouble

Beats per minute

Owner: AgsDevin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.0.0


The “buffer” property

  “buffer”                   gpointer

The buffer

Owner: AgsDevin

Flags: Read

Since: 3.0.0


The “buffer-size” property

  “buffer-size”              guint

The buffer size

Owner: AgsDevin

Flags: Read / Write

Allowed values: [16,16384]

Default value: 1024

Since: 3.0.0


The “delay-factor” property

  “delay-factor”             gdouble

tact

Owner: AgsDevin

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.0.0


The “device” property

  “device”                   gchar *

The alsa soundcard indentifier

Owner: AgsDevin

Flags: Read / Write

Default value: "hw:0,0"

Since: 3.0.0


The “dsp-channels” property

  “dsp-channels”             guint

The dsp channel count

Owner: AgsDevin

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

Flags: Read / Write

Default value: 16

Since: 3.0.0


The “pcm-channels” property

  “pcm-channels”             guint

The pcm channel count

Owner: AgsDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.0.0


The “samplerate” property

  “samplerate”               guint

The samplerate

Owner: AgsDevin

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 48000

Since: 3.0.0