AgsCoreAudioPort

AgsCoreAudioPort — core audio resource.

Stability Level

Stable, unless otherwise indicated

Functions

Properties

AgsCoreAudioClient * core-audio-client Read / Write
GObject * core-audio-device Read / Write
char * port-name Read / Write

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsCoreAudioPortFlags
    GObject
    ╰── AgsCoreAudioPort

Includes

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

Description

The AgsCoreAudioPort represents either a core audio sequencer or soundcard to communicate with.

Functions

AGS_CORE_AUDIO_PORT_GET_OBJ_MUTEX()

#define AGS_CORE_AUDIO_PORT_GET_OBJ_MUTEX(obj) (&(((AgsCoreAudioPort *) obj)->obj_mutex))

ags_core_audio_port_test_flags ()

gboolean
ags_core_audio_port_test_flags (AgsCoreAudioPort *core_audio_port,
                                AgsCoreAudioPortFlags flags);

Test flags to be set on core_audio_port .

Parameters

core_audio_port

the AgsCoreAudioPort

 

flags

the flags

 

Returns

TRUE if flags are set, else FALSE

Since: 3.0.0


ags_core_audio_port_set_flags ()

void
ags_core_audio_port_set_flags (AgsCoreAudioPort *core_audio_port,
                               AgsCoreAudioPortFlags flags);

Enable a feature of core_audio_port .

Parameters

core_audio_port

the AgsCoreAudioPort

 

flags

see AgsCoreAudioPortFlags

 

Since: 3.0.0


ags_core_audio_port_unset_flags ()

void
ags_core_audio_port_unset_flags (AgsCoreAudioPort *core_audio_port,
                                 AgsCoreAudioPortFlags flags);

Disable a feature of core_audio_port .

Parameters

core_audio_port

the AgsCoreAudioPort

 

flags

see AgsCoreAudioPortFlags

 

Since: 3.0.0


ags_core_audio_port_find ()

GList *
ags_core_audio_port_find (GList *core_audio_port,
                          gchar *port_name);

Finds next match of port_name in core_audio_port .

Parameters

core_audio_port

the GList containing AgsCoreAudioPort.

[element-type AgsAudio.CoreAudioPort][transfer none]

port_name

the port name to find

 

Returns

the next matching GList or NULL.

[element-type AgsAudio.CoreAudioPort][transfer none]

Since: 3.0.0


ags_core_audio_port_register ()

void
ags_core_audio_port_register (AgsCoreAudioPort *core_audio_port,
                              gchar *port_name,
                              gboolean is_audio,
                              gboolean is_midi,
                              gboolean is_output);

Register a new core audio port and read uuid. Creates a new AgsSequencer or AgsSoundcard object.

Parameters

core_audio_port

the AgsCoreAudioPort

 

port_name

the name as string

 

is_audio

if TRUE interpreted as audio port

 

is_midi

if TRUE interpreted as midi port

 

is_output

if TRUE port is acting as output, otherwise as input

 

Since: 3.0.0


ags_core_audio_port_unregister ()

void
ags_core_audio_port_unregister (AgsCoreAudioPort *core_audio_port);

ags_core_audio_port_set_format ()

void
ags_core_audio_port_set_format (AgsCoreAudioPort *core_audio_port,
                                AgsSoundcardFormat format);

ags_core_audio_port_set_samplerate ()

void
ags_core_audio_port_set_samplerate (AgsCoreAudioPort *core_audio_port,
                                    guint samplerate);

ags_core_audio_port_set_pcm_channels ()

void
ags_core_audio_port_set_pcm_channels (AgsCoreAudioPort *core_audio_port,
                                      guint pcm_channels);

ags_core_audio_port_set_buffer_size ()

void
ags_core_audio_port_set_buffer_size (AgsCoreAudioPort *core_audio_port,
                                     guint buffer_size);

ags_core_audio_port_set_cache_buffer_size ()

void
ags_core_audio_port_set_cache_buffer_size
                               (AgsCoreAudioPort *core_audio_port,
                                guint cache_buffer_size);

ags_core_audio_port_get_latency ()

guint
ags_core_audio_port_get_latency (AgsCoreAudioPort *core_audio_port);

Gets latency.

Parameters

core_audio_port

the AgsCoreAudioPort

 

Since: 3.0.0


ags_core_audio_port_new ()

AgsCoreAudioPort *
ags_core_audio_port_new (GObject *core_audio_client);

Create a new instance of AgsCoreAudioPort.

Parameters

core_audio_client

the AgsCoreAudioClient assigned to

 

Returns

the new AgsCoreAudioPort

Since: 3.0.0

Types and Values

AGS_CORE_AUDIO_PORT_DEFAULT_CACHE_BUFFER_SIZE

#define AGS_CORE_AUDIO_PORT_DEFAULT_CACHE_BUFFER_SIZE (4096)

enum AgsCoreAudioPortFlags

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

Members

AGS_CORE_AUDIO_PORT_REGISTERED

the port was registered

 

AGS_CORE_AUDIO_PORT_IS_AUDIO

the port provides audio data

 

AGS_CORE_AUDIO_PORT_IS_MIDI

the port provides midi data

 

AGS_CORE_AUDIO_PORT_IS_OUTPUT

the port does output

 

AGS_CORE_AUDIO_PORT_IS_INPUT

the port does input

 

Property Details

The “core-audio-client” property

  “core-audio-client”        AgsCoreAudioClient *

The assigned AgsCoreAudioClient.

Owner: AgsCoreAudioPort

Flags: Read / Write

Since: 3.0.0


The “core-audio-device” property

  “core-audio-device”        GObject *

The assigned AgsCoreAudioDevout.

Owner: AgsCoreAudioPort

Flags: Read / Write

Since: 3.0.0


The “port-name” property

  “port-name”                char *

The core audio soundcard indentifier

Owner: AgsCoreAudioPort

Flags: Read / Write

Default value: NULL

Since: 3.0.0