## AgsAudioUnitPort

AgsAudioUnitPort — core audio resource.

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_AUDIO_UNIT_PORT_GET_OBJ_MUTEX()
gboolean | ags_audio_unit_port_test_flags ()
void | ags_audio_unit_port_set_flags ()
void | ags_audio_unit_port_unset_flags ()
GList * | ags_audio_unit_port_find ()
void | ags_audio_unit_port_register ()
void | ags_audio_unit_port_unregister ()
void | ags_audio_unit_port_set_format ()
void | ags_audio_unit_port_set_samplerate ()
void | ags_audio_unit_port_set_pcm_channels ()
void | ags_audio_unit_port_set_buffer_size ()
AgsAudioUnitPort * | ags_audio_unit_port_new ()

## Types and Values

#define | AGS_AUDIO_UNIT_PORT_DEFAULT_CACHE_BUFFER_SIZE
enum | AgsAudioUnitPortFlags

## Includes

    #include <ags/audio/audio-unit/ags_audio_unit_port.h>

## Description

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

## Functions

### AGS_AUDIO_UNIT_PORT_GET_OBJ_MUTEX()

    #define AGS_AUDIO_UNIT_PORT_GET_OBJ_MUTEX(obj) (&(((AgsAudioUnitPort *) obj)->obj_mutex))

### ags_audio_unit_port_test_flags ()

    gboolean
    ags_audio_unit_port_test_flags (AgsAudioUnitPort *audio_unit_port,
                                    AgsAudioUnitPortFlags flags);

Test `flags` to be set on `audio_unit_port` .

#### Parameters

audio_unit_port | the AgsAudioUnitPort |
flags | the flags |

#### Returns

`TRUE` if flags are set, else `FALSE`

Since: 3.0.0

### ags_audio_unit_port_set_flags ()

    void
    ags_audio_unit_port_set_flags (AgsAudioUnitPort *audio_unit_port,
                                   AgsAudioUnitPortFlags flags);

Enable a feature of `audio_unit_port` .

#### Parameters

audio_unit_port | the AgsAudioUnitPort |
flags | see AgsAudioUnitPortFlags |

Since: 3.0.0

### ags_audio_unit_port_unset_flags ()

    void
    ags_audio_unit_port_unset_flags (AgsAudioUnitPort *audio_unit_port,
                                     AgsAudioUnitPortFlags flags);

Disable a feature of `audio_unit_port` .

#### Parameters

audio_unit_port | the AgsAudioUnitPort |
flags | see AgsAudioUnitPortFlags |

Since: 3.0.0

### ags_audio_unit_port_find ()

    GList *
    ags_audio_unit_port_find (GList *audio_unit_port,
                              gchar *port_name);

Finds next match of `port_name` in `audio_unit_port` .

#### Parameters

audio_unit_port | the GList containing AgsAudioUnitPort. | [element-type AgsAudio.AudioUnitPort][transfer none]
port_name | the port name to find |

#### Returns

the next matching GList or `NULL`.

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

Since: 3.0.0

### ags_audio_unit_port_register ()

    void
    ags_audio_unit_port_register (AgsAudioUnitPort *audio_unit_port,
                                  gchar *port_name,
                                  gboolean is_audio,
                                  gboolean is_midi,
                                  gboolean is_output);

### ags_audio_unit_port_unregister ()

    void
    ags_audio_unit_port_unregister (AgsAudioUnitPort *audio_unit_port);

### ags_audio_unit_port_set_format ()

    void
    ags_audio_unit_port_set_format (AgsAudioUnitPort *audio_unit_port,
                                    AgsSoundcardFormat format);

### ags_audio_unit_port_set_samplerate ()

    void
    ags_audio_unit_port_set_samplerate (AgsAudioUnitPort *audio_unit_port,
                                        guint samplerate);

### ags_audio_unit_port_set_pcm_channels ()

    void
    ags_audio_unit_port_set_pcm_channels (AgsAudioUnitPort *audio_unit_port,
                                          guint pcm_channels);

### ags_audio_unit_port_set_buffer_size ()

    void
    ags_audio_unit_port_set_buffer_size (AgsAudioUnitPort *audio_unit_port,
                                         guint buffer_size);

### ags_audio_unit_port_new ()

    AgsAudioUnitPort *
    ags_audio_unit_port_new (GObject *audio_unit_client);

Create a new instance of AgsAudioUnitPort.

#### Parameters

audio_unit_client | the AgsAudioUnitClient assigned to |

#### Returns

the new AgsAudioUnitPort

Since: 3.0.0

## Types and Values

### AGS_AUDIO_UNIT_PORT_DEFAULT_CACHE_BUFFER_SIZE

    #define AGS_AUDIO_UNIT_PORT_DEFAULT_CACHE_BUFFER_SIZE (4096)

### enum AgsAudioUnitPortFlags

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

#### Members

AGS_AUDIO_UNIT_PORT_REGISTERED | the port was registered |
AGS_AUDIO_UNIT_PORT_IS_AUDIO | the port provides audio data |
AGS_AUDIO_UNIT_PORT_IS_MIDI | the port provides midi data |
AGS_AUDIO_UNIT_PORT_IS_OUTPUT | the port does output |
AGS_AUDIO_UNIT_PORT_IS_INPUT | the port does input |