AgsOssDevin

AgsOssDevin — 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
    ╰── AgsOssDevinFlags
    GObject
    ╰── AgsOssDevin

Includes

#include <ags/audio/ags_oss_devin.h>

Description

AgsOssDevin represents a soundcard and supports input.

Functions

AGS_OSS_DEVIN_GET_OBJ_MUTEX()

#define AGS_OSS_DEVIN_GET_OBJ_MUTEX(obj) (&(((AgsOssDevin *) obj)->obj_mutex))

ags_oss_devin_error_quark ()

GQuark
ags_oss_devin_error_quark ();

ags_oss_devin_test_flags ()

gboolean
ags_oss_devin_test_flags (AgsOssDevin *oss_devin,
                          AgsOssDevinFlags flags);

Test flags to be set on oss_devin .

Parameters

oss_devin

the AgsOssDevin

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.13.2


ags_oss_devin_set_flags ()

void
ags_oss_devin_set_flags (AgsOssDevin *oss_devin,
                         AgsOssDevinFlags flags);

Enable a feature of oss_devin .

Parameters

oss_devin

the AgsOssDevin

 

flags

see AgsOssDevinFlags

 

Since: 3.13.2


ags_oss_devin_unset_flags ()

void
ags_oss_devin_unset_flags (AgsOssDevin *oss_devin,
                           AgsOssDevinFlags flags);

Disable a feature of oss_devin .

Parameters

oss_devin

the AgsOssDevin

 

flags

see AgsOssDevinFlags

 

Since: 3.13.2


ags_oss_devin_switch_buffer_flag ()

void
ags_oss_devin_switch_buffer_flag (AgsOssDevin *oss_devin);

The buffer flag indicates the currently recorded buffer.

Parameters

oss_devin

the AgsOssDevin

 

Since: 3.13.2


ags_oss_devin_adjust_delay_and_attack ()

void
ags_oss_devin_adjust_delay_and_attack (AgsOssDevin *oss_devin);

Calculate delay and attack and reset it.

Parameters

oss_devin

the AgsOssDevin

 

Since: 3.13.2


ags_oss_devin_realloc_buffer ()

void
ags_oss_devin_realloc_buffer (AgsOssDevin *oss_devin);

Reallocate the internal audio buffer.

Parameters

oss_devin

the AgsOssDevin

 

Since: 3.13.2


ags_oss_devin_new ()

AgsOssDevin *
ags_oss_devin_new ();

Creates a new instance of AgsOssDevin.

Returns

the new AgsOssDevin

Since: 3.13.2

Types and Values

AGS_OSS_DEVIN_DEFAULT_OSS_DEVICE

#define AGS_OSS_DEVIN_DEFAULT_OSS_DEVICE "/dev/dsp"

AGS_OSS_DEVIN_DEFAULT_OSS_MIXER_DEVICE

#define AGS_OSS_DEVIN_DEFAULT_OSS_MIXER_DEVICE "/dev/mixer"

AGS_OSS_DEVIN_DEFAULT_APP_BUFFER_SIZE

#define AGS_OSS_DEVIN_DEFAULT_APP_BUFFER_SIZE (4)

AGS_OSS_DEVIN_DEFAULT_BACKEND_BUFFER_SIZE

#define AGS_OSS_DEVIN_DEFAULT_BACKEND_BUFFER_SIZE (8)

enum AgsOssDevinFlags

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

Members

AGS_OSS_DEVIN_INITIALIZED

the soundcard was initialized

 

AGS_OSS_DEVIN_START_RECORD

capture starting

 

AGS_OSS_DEVIN_RECORD

do capture

 

AGS_OSS_DEVIN_SHUTDOWN

stop capture

 

AGS_OSS_DEVIN_NONBLOCKING

do non-blocking calls

 

AGS_OSS_DEVIN_ATTACK_FIRST

use first attack, instead of second one

 

enum AgsOssDevinAppBufferMode

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

Members

AGS_OSS_DEVIN_APP_BUFFER_0

ring-buffer 0

 

AGS_OSS_DEVIN_APP_BUFFER_1

ring-buffer 1

 

AGS_OSS_DEVIN_APP_BUFFER_2

ring-buffer 2

 

AGS_OSS_DEVIN_APP_BUFFER_3

ring-buffer 3

 

enum AgsOssDevinBackendBufferMode

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

Members

AGS_OSS_DEVIN_BACKEND_BUFFER_0

ring-buffer 0

 

AGS_OSS_DEVIN_BACKEND_BUFFER_1

ring-buffer 1

 

AGS_OSS_DEVIN_BACKEND_BUFFER_2

ring-buffer 2

 

AGS_OSS_DEVIN_BACKEND_BUFFER_3

ring-buffer 3

 

AGS_OSS_DEVIN_BACKEND_BUFFER_4

ring-buffer 4

 

AGS_OSS_DEVIN_BACKEND_BUFFER_5

ring-buffer 5

 

AGS_OSS_DEVIN_BACKEND_BUFFER_6

ring-buffer 6

 

AGS_OSS_DEVIN_BACKEND_BUFFER_7

ring-buffer 7

 

AGS_OSS_DEVIN_ERROR

#define AGS_OSS_DEVIN_ERROR (ags_oss_devin_error_quark())

enum AgsOssDevinError

Members

AGS_OSS_DEVIN_ERROR_LOCKED_SOUNDCARD

   

AGS_OSS_DEVIN_ERROR_BROKEN_CONFIGURATION

   

AGS_OSS_DEVIN_ERROR_ACCESS_TYPE_NOT_AVAILABLE

   

AGS_OSS_DEVIN_ERROR_SAMPLE_FORMAT_NOT_AVAILABLE

   

AGS_OSS_DEVIN_ERROR_CHANNELS_NOT_AVAILABLE

   

AGS_OSS_DEVIN_ERROR_SAMPLERATE_NOT_AVAILABLE

   

AGS_OSS_DEVIN_ERROR_BUFFER_SIZE_NOT_AVAILABLE

   

AGS_OSS_DEVIN_ERROR_HW_PARAMETERS_NOT_AVAILABLE

   

Property Details

The “attack” property

  “attack”                   gpointer

Attack of the buffer

Owner: AgsOssDevin

Flags: Read

Since: 3.13.2


The “bpm” property

  “bpm”                      double

Beats per minute

Owner: AgsOssDevin

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.13.2


The “buffer” property

  “buffer”                   gpointer

The buffer

Owner: AgsOssDevin

Flags: Read

Since: 3.13.2


The “buffer-size” property

  “buffer-size”              guint

The buffer size

Owner: AgsOssDevin

Flags: Read / Write

Allowed values: [16,16384]

Default value: 1024

Since: 3.13.2


The “delay-factor” property

  “delay-factor”             double

tact

Owner: AgsOssDevin

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.13.2


The “device” property

  “device”                   char *

The soundcard indentifier

Owner: AgsOssDevin

Flags: Read / Write

Default value: "/dev/dsp"

Since: 3.13.2


The “dsp-channels” property

  “dsp-channels”             guint

The dsp channel count

Owner: AgsOssDevin

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

Flags: Read / Write

Default value: 16

Since: 3.13.2


The “pcm-channels” property

  “pcm-channels”             guint

The pcm channel count

Owner: AgsOssDevin

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.13.2


The “samplerate” property

  “samplerate”               guint

The samplerate

Owner: AgsOssDevin

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 48000

Since: 3.13.2