Open audio files

There is a handy function called void ags_audio_open_files(AgsAudio*, GSList*, gboolean, gboolean) taking as parameter filenames as GSList, overwrite_channels and create_channels as boolean. Filenames is a single linked list of strings, overwrite_channels means use pre-allocated channels and create_channels to allow instantiate new channels. The boolean parameters can be combined as you want.

Audio container

The AgsAudioContainer object can open Soundfont2, Gig and DLS2 files by using libinstpatch. The AgsAudioContainer:sound-container field implements AgsSoundContainer and provides you many functions to dealing with container formats.

There are convenient functions to obtain a GObject subtype implementing AgsSoundResource:

  • GList* ags_sound_container_get_resource_all()
  • GList* ags_sound_container_get_resource_by_name()
  • GList* ags_sound_container_get_resource_by_index()
  • GList* ags_sound_container_get_resource_current()

Audio file

The AgsAudioFile object can open FLAC, WAV, AIFF and OGG using libsndfile. The AgsAudioFile:sound-resource field implements AgsSoundResource and provides you many functions to dealing with audio file formats.

  • void ags_sound_resource_info()
  • void ags_sound_resource_set_presets()
  • void ags_sound_resource_get_presets()
  • guint ags_sound_resource_read()
  • void ags_sound_resource_write()
  • void ags_sound_resource_flush()
  • void ags_sound_resource_seek()