## AgsSF2Loader

AgsSF2Loader — load Soundfont2 asynchronously

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | AGS_SF2_LOADER_GET_OBJ_MUTEX()
gboolean | ags_sf2_loader_test_flags ()
void | ags_sf2_loader_set_flags ()
void | ags_sf2_loader_unset_flags ()
AgsAudio * | ags_sf2_loader_get_audio ()
void | ags_sf2_loader_set_audio ()
gchar * | ags_sf2_loader_get_filename ()
void | ags_sf2_loader_set_filename ()
gchar * | ags_sf2_loader_get_preset ()
void | ags_sf2_loader_set_preset ()
gchar * | ags_sf2_loader_get_instrument ()
void | ags_sf2_loader_set_instrument ()
AgsAudioContainer * | ags_sf2_loader_get_audio_container ()
void | ags_sf2_loader_set_audio_container ()
void | ags_sf2_loader_start ()
AgsSF2Loader * | ags_sf2_loader_new ()

## Properties

AgsAudio * | audio | Read / Write
AgsAudioContainer * | audio-container | Read / Write
char * | filename | Read / Write
char * | instrument | Read / Write
char * | preset | Read / Write
AgsAudio * | audio | Read / Write
AgsAudioContainer * | audio-container | Read / Write
char * | filename | Read / Write
char * | instrument | Read / Write
char * | preset | Read / Write

## Types and Values

enum | AgsSF2LoaderFlags

## Object Hierarchy

        GObject
        ╰── AgsSF2Loader

## Includes

    #include <ags/plugin/ags_sf2_loader.h>

## Description

The AgsSF2Loader loads Soundfont2 audio data asynchronously.

## Functions

### AGS_SF2_LOADER_GET_OBJ_MUTEX()

    #define AGS_SF2_LOADER_GET_OBJ_MUTEX(obj) (&(((AgsSF2Loader *) obj)->obj_mutex))

### ags_sf2_loader_test_flags ()

    gboolean
    ags_sf2_loader_test_flags (AgsSF2Loader *sf2_loader,
                               AgsSF2LoaderFlags flags);

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

#### Parameters

sf2_loader | the AgsSF2Loader |
flags | the flags |

#### Returns

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

Since: 3.0.0

### ags_sf2_loader_set_flags ()

    void
    ags_sf2_loader_set_flags (AgsSF2Loader *sf2_loader,
                              AgsSF2LoaderFlags flags);

Set flags.

#### Parameters

sf2_loader | the AgsSF2Loader |
flags | the flags |

Since: 3.0.0

### ags_sf2_loader_unset_flags ()

    void
    ags_sf2_loader_unset_flags (AgsSF2Loader *sf2_loader,
                                AgsSF2LoaderFlags flags);

Unset flags.

#### Parameters

sf2_loader | the AgsSF2Loader |
flags | the flags |

Since: 3.0.0

### ags_sf2_loader_get_audio ()

    AgsAudio *
    ags_sf2_loader_get_audio (AgsSF2Loader *sf2_loader);

Get audio of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |

#### Returns

the assigned AgsAudio.

[transfer full]

Since: 3.2.0

### ags_sf2_loader_set_audio ()

    void
    ags_sf2_loader_set_audio (AgsSF2Loader *sf2_loader,
                              AgsAudio *audio);

Set audio of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |
audio | the AgsAudio |

Since: 3.2.0

### ags_sf2_loader_get_filename ()

    gchar *
    ags_sf2_loader_get_filename (AgsSF2Loader *sf2_loader);

Get filename of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |

#### Returns

the assigned filename.

[transfer full]

Since: 3.2.0

### ags_sf2_loader_set_filename ()

    void
    ags_sf2_loader_set_filename (AgsSF2Loader *sf2_loader,
                                 gchar *filename);

Set filename of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |
filename | the filename |

Since: 3.2.0

### ags_sf2_loader_get_preset ()

    gchar *
    ags_sf2_loader_get_preset (AgsSF2Loader *sf2_loader);

Get preset of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |

#### Returns

the assigned preset.

[transfer full]

Since: 3.2.0

### ags_sf2_loader_set_preset ()

    void
    ags_sf2_loader_set_preset (AgsSF2Loader *sf2_loader,
                               gchar *preset);

Set preset of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |
preset | the preset |

Since: 3.2.0

### ags_sf2_loader_get_instrument ()

    gchar *
    ags_sf2_loader_get_instrument (AgsSF2Loader *sf2_loader);

Get instrument of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |

#### Returns

the assigned instrument.

[transfer full]

Since: 3.2.0

### ags_sf2_loader_set_instrument ()

    void
    ags_sf2_loader_set_instrument (AgsSF2Loader *sf2_loader,
                                   gchar *instrument);

Set instrument of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |
instrument | the instrument |

Since: 3.2.0

### ags_sf2_loader_get_audio_container ()

    AgsAudioContainer *
    ags_sf2_loader_get_audio_container (AgsSF2Loader *sf2_loader);

Get audio container of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |

#### Returns

the assigned AgsAudioContainer.

[transfer full]

Since: 3.2.0

### ags_sf2_loader_set_audio_container ()

    void
    ags_sf2_loader_set_audio_container (AgsSF2Loader *sf2_loader,
                                        AgsAudioContainer *audio_container);

Set audio container of `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |
audio_container | the AgsAudioContainer |

Since: 3.2.0

### ags_sf2_loader_start ()

    void
    ags_sf2_loader_start (AgsSF2Loader *sf2_loader);

Start `sf2_loader` .

#### Parameters

sf2_loader | the AgsSF2Loader |

Since: 3.0.0

### ags_sf2_loader_new ()

    AgsSF2Loader *
    ags_sf2_loader_new (AgsAudio *audio,
                        gchar *filename,
                        gchar *preset,
                        gchar *instrument);

Create a new instance of AgsSF2Loader.

#### Parameters

audio | the AgsAudio |
filename | the filename |
preset | the preset |
instrument | the instrument |

#### Returns

the new AgsSF2Loader

Since: 3.0.0

## Types and Values

### enum AgsSF2LoaderFlags

Enum values to configure SF2 loader.

#### Members

AGS_SF2_LOADER_HAS_COMPLETED | has completed |
AGS_SF2_LOADER_RUN_APPLY_SYNTH | run apply synth |

## Property Details

### The `“audio”` property

      “audio”                    AgsAudio *

The assigned audio.

Owner: AgsSF2Loader

Flags: Read / Write

Since: 3.0.0

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

      “audio-container”          AgsAudioContainer *

The audio container opened.

Owner: AgsSF2Loader

Flags: Read / Write

Since: 3.0.0

### The `“filename”` property

      “filename”                 char *

The filename to open.

Owner: AgsSF2Loader

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“instrument”` property

      “instrument”               char *

The instrument to open.

Owner: AgsSF2Loader

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“preset”` property

      “preset”                   char *

The preset to open.

Owner: AgsSF2Loader

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“audio”` property

      “audio”                    AgsAudio *

The assigned audio.

Owner: AgsSF2Loader

Flags: Read / Write

Since: 3.0.0

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

      “audio-container”          AgsAudioContainer *

The audio container opened.

Owner: AgsSF2Loader

Flags: Read / Write

Since: 3.0.0

### The `“filename”` property

      “filename”                 char *

The filename to open.

Owner: AgsSF2Loader

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“instrument”` property

      “instrument”               char *

The instrument to open.

Owner: AgsSF2Loader

Flags: Read / Write

Default value: NULL

Since: 3.0.0

### The `“preset”` property

      “preset”                   char *

The preset to open.

Owner: AgsSF2Loader

Flags: Read / Write

Default value: NULL

Since: 3.0.0