## AgsSndfile

AgsSndfile — Libsndfile wrapper

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_SNDFILE_GET_OBJ_MUTEX()
gboolean | ags_sndfile_test_flags ()
void | ags_sndfile_set_flags ()
void | ags_sndfile_unset_flags ()
gboolean | ags_sndfile_check_suffix ()
AgsSndfile * | ags_sndfile_new ()

## Properties

guint | audio-channels | Read / Write
guint | buffer-size | Read / Write
gpointer | file | Read / Write
guint | format | Read / Write

## Types and Values

enum | AgsSndfileFlags

## Object Hierarchy

        GFlags
        ╰── AgsSndfileFlags
        GObject
        ╰── AgsSndfile

## Includes

    #include <ags/audio/file/ags_sndfile.h>

## Description

AgsSndfile is the base object to ineract with libsndfile.

## Functions

### AGS_SNDFILE_GET_OBJ_MUTEX()

    #define AGS_SNDFILE_GET_OBJ_MUTEX(obj) (&(((AgsSndfile *) obj)->obj_mutex))

### ags_sndfile_test_flags ()

    gboolean
    ags_sndfile_test_flags (AgsSndfile *sndfile,
                            AgsSndfileFlags flags);

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

#### Parameters

sndfile | the AgsSndfile |
flags | the flags |

#### Returns

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

Since: 3.0.0

### ags_sndfile_set_flags ()

    void
    ags_sndfile_set_flags (AgsSndfile *sndfile,
                           AgsSndfileFlags flags);

Enable a feature of `sndfile` .

#### Parameters

sndfile | the AgsSndfile |
flags | see AgsSndfileFlags |

Since: 3.0.0

### ags_sndfile_unset_flags ()

    void
    ags_sndfile_unset_flags (AgsSndfile *sndfile,
                             AgsSndfileFlags flags);

Disable a feature of `sndfile` .

#### Parameters

sndfile | the AgsSndfile |
flags | see AgsSndfileFlags |

Since: 3.0.0

### ags_sndfile_check_suffix ()

    gboolean
    ags_sndfile_check_suffix (gchar *filename);

Check suffix.

#### Parameters

filename | the filename |

#### Returns

`TRUE` if suffix supported, else `FALSE`

Since: 3.6.0

### ags_sndfile_new ()

    AgsSndfile *
    ags_sndfile_new ();

Creates a new instance of AgsSndfile.

#### Returns

the new AgsSndfile.

Since: 3.0.0

## Types and Values

### enum AgsSndfileFlags

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

#### Members

AGS_SNDFILE_VIRTUAL | virtual IO |
AGS_SNDFILE_FILL_CACHE | fill cache |

## Property Details

### The `“audio-channels”` property

      “audio-channels”           guint

The audio channels to be used.

Owner: AgsSndfile

Flags: Read / Write

Default value: 0

Since: 3.0.0

### The `“buffer-size”` property

      “buffer-size”              guint

The buffer size to be used.

Owner: AgsSndfile

Flags: Read / Write

Default value: 0

Since: 3.0.0

### The `“file”` property

      “file”                     gpointer

The assigned output SNDFILE.

Owner: AgsSndfile

Flags: Read / Write

Since: 3.0.0

### The `“format”` property

      “format”                   guint

The format to be used.

Owner: AgsSndfile

Flags: Read / Write

Default value: 0

Since: 3.0.0