AgsPulseDevout

AgsPulseDevout — Output to 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
AgsPulseClient * pulse-client Read / Write
gpointer pulse-port Read / Write
guint samplerate Read / Write

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsPulseDevoutFlags
    GObject
    ╰── AgsPulseDevout

Includes

#include <ags/audio/pulse/ags_pulse_devout.h>

Description

AgsPulseDevout represents a soundcard and supports output.

Functions

AGS_PULSE_DEVOUT_GET_OBJ_MUTEX()

#define AGS_PULSE_DEVOUT_GET_OBJ_MUTEX(obj) (&(((AgsPulseDevout *) obj)->obj_mutex))

ags_pulse_devout_error_quark ()

GQuark
ags_pulse_devout_error_quark ();

ags_pulse_devout_test_flags ()

gboolean
ags_pulse_devout_test_flags (AgsPulseDevout *pulse_devout,
                             AgsPulseDevoutFlags flags);

Test flags to be set on pulse_devout .

Parameters

pulse_devout

the AgsPulseDevout

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_pulse_devout_set_flags ()

void
ags_pulse_devout_set_flags (AgsPulseDevout *pulse_devout,
                            AgsPulseDevoutFlags flags);

Enable a feature of pulse_devout .

Parameters

pulse_devout

the AgsPulseDevout

 

flags

see AgsPulseDevoutFlags

 

Since: 3.0.0


ags_pulse_devout_unset_flags ()

void
ags_pulse_devout_unset_flags (AgsPulseDevout *pulse_devout,
                              AgsPulseDevoutFlags flags);

Disable a feature of pulse_devout .

Parameters

pulse_devout

the AgsPulseDevout

 

flags

see AgsPulseDevoutFlags

 

Since: 3.0.0


ags_pulse_devout_switch_buffer_flag ()

void
ags_pulse_devout_switch_buffer_flag (AgsPulseDevout *pulse_devout);

The buffer flag indicates the currently played buffer.

Parameters

pulse_devout

an AgsPulseDevout

 

Since: 3.0.0


ags_pulse_devout_adjust_delay_and_attack ()

void
ags_pulse_devout_adjust_delay_and_attack
                               (AgsPulseDevout *pulse_devout);

Calculate delay and attack and reset it.

Parameters

pulse_devout

the AgsPulseDevout

 

Since: 3.0.0


ags_pulse_devout_realloc_buffer ()

void
ags_pulse_devout_realloc_buffer (AgsPulseDevout *pulse_devout);

Reallocate the internal audio buffer.

Parameters

pulse_devout

the AgsPulseDevout

 

Since: 3.0.0


ags_pulse_devout_new ()

AgsPulseDevout *
ags_pulse_devout_new ();

Creates a new instance of AgsPulseDevout.

Returns

the new AgsPulseDevout

Since: 3.0.0

Types and Values

AGS_PULSE_DEVOUT_DEFAULT_APP_BUFFER_SIZE

#define AGS_PULSE_DEVOUT_DEFAULT_APP_BUFFER_SIZE (8)

enum AgsPulseDevoutFlags

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

Members

AGS_PULSE_DEVOUT_INITIALIZED

the soundcard was initialized

 

AGS_PULSE_DEVOUT_START_PLAY

playback starting

 

AGS_PULSE_DEVOUT_PLAY

do playback

 

AGS_PULSE_DEVOUT_SHUTDOWN

stop playback

 

AGS_PULSE_DEVOUT_NONBLOCKING

do non-blocking calls

 

AGS_PULSE_DEVOUT_ATTACK_FIRST

use first attack, instead of second one

 

enum AgsPulseDevoutAppBufferMode

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

Members

AGS_PULSE_DEVOUT_APP_BUFFER_0

ring-buffer 0

 

AGS_PULSE_DEVOUT_APP_BUFFER_1

ring-buffer 1

 

AGS_PULSE_DEVOUT_APP_BUFFER_2

ring-buffer 2

 

AGS_PULSE_DEVOUT_APP_BUFFER_3

ring-buffer 3

 

AGS_PULSE_DEVOUT_APP_BUFFER_4

ring-buffer 4

 

AGS_PULSE_DEVOUT_APP_BUFFER_5

ring-buffer 5

 

AGS_PULSE_DEVOUT_APP_BUFFER_6

ring-buffer 6

 

AGS_PULSE_DEVOUT_APP_BUFFER_7

ring-buffer 7

 

enum AgsPulseDevoutSyncFlags

Enum values to control the synchronization between soundcard and client.

Members

AGS_PULSE_DEVOUT_PASS_THROUGH

do not sync

 

AGS_PULSE_DEVOUT_INITIAL_CALLBACK

initial callback

 

AGS_PULSE_DEVOUT_CALLBACK_WAIT

sync wait, soundcard conditional lock

 

AGS_PULSE_DEVOUT_CALLBACK_DONE

sync done, soundcard conditional lock

 

AGS_PULSE_DEVOUT_CALLBACK_FINISH_WAIT

sync wait, client conditional lock

 

AGS_PULSE_DEVOUT_CALLBACK_FINISH_DONE

sync done, client conditional lock

 

AGS_PULSE_DEVOUT_ERROR

#define AGS_PULSE_DEVOUT_ERROR (ags_pulse_devout_error_quark())

enum AgsPulseDevoutError

Members

AGS_PULSE_DEVOUT_ERROR_LOCKED_SOUNDCARD

   

Property Details

The “attack” property

  “attack”                   gpointer

Attack of the buffer

Owner: AgsPulseDevout

Flags: Read

Since: 3.0.0


The “bpm” property

  “bpm”                      double

Beats per minute

Owner: AgsPulseDevout

Flags: Read / Write

Allowed values: [1,240]

Default value: 120

Since: 3.0.0


The “buffer” property

  “buffer”                   gpointer

The buffer

Owner: AgsPulseDevout

Flags: Read

Since: 3.0.0


The “buffer-size” property

  “buffer-size”              guint

The buffer size

Owner: AgsPulseDevout

Flags: Read / Write

Allowed values: [16,16384]

Default value: 1024

Since: 3.0.0


The “delay-factor” property

  “delay-factor”             double

tact

Owner: AgsPulseDevout

Flags: Read / Write

Allowed values: [0,16]

Default value: 1

Since: 3.0.0


The “device” property

  “device”                   char *

The pulse soundcard indentifier

Owner: AgsPulseDevout

Flags: Read / Write

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

Since: 3.0.0


The “dsp-channels” property

  “dsp-channels”             guint

The dsp channel count

Owner: AgsPulseDevout

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

Flags: Read / Write

Default value: 16

Since: 3.0.0


The “pcm-channels” property

  “pcm-channels”             guint

The pcm channel count

Owner: AgsPulseDevout

Flags: Read / Write

Allowed values: [1,64]

Default value: 2

Since: 3.0.0


The “pulse-client” property

  “pulse-client”             AgsPulseClient *

The assigned AgsPulseClient

Owner: AgsPulseDevout

Flags: Read / Write

Since: 3.0.0


The “pulse-port” property

  “pulse-port”               gpointer

The assigned AgsPulsePort

Owner: AgsPulseDevout

Flags: Read / Write

Since: 3.0.0


The “samplerate” property

  “samplerate”               guint

The samplerate

Owner: AgsPulseDevout

Flags: Read / Write

Allowed values: [8000,5644800]

Default value: 48000

Since: 3.0.0