AgsSoundContainer

AgsSoundContainer — read/write audio

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── AgsSoundContainer

Known Implementations

AgsSoundContainer is implemented by AgsIpatch and AgsSFZFile.

Includes

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

Description

The AgsSoundContainer interface gives you a unique access to file related IO operations.

Functions

ags_sound_container_open ()

gboolean
ags_sound_container_open (AgsSoundContainer *sound_container,
                          gchar *filename);

Open sound_container .

Parameters

sound_container

the AgsSoundcontainer

 

filename

the filename

 

Returns

TRUE if open succeeded, else FALSE

Since: 3.0.0


ags_sound_container_get_level_count ()

guint
ags_sound_container_get_level_count (AgsSoundContainer *sound_container);

Get level count.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the level count

Since: 3.0.0


ags_sound_container_get_nesting_level ()

guint
ags_sound_container_get_nesting_level (AgsSoundContainer *sound_container);

Get nesting level.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the nesting level

Since: 3.0.0


ags_sound_container_get_level_id ()

gchar *
ags_sound_container_get_level_id (AgsSoundContainer *sound_container);

Get level id.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the level id as string

Since: 3.0.0


ags_sound_container_get_level_index ()

guint
ags_sound_container_get_level_index (AgsSoundContainer *sound_container);

Get level index.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the level index unsigned integer

Since: 3.0.0


ags_sound_container_get_sublevel_name ()

gchar **
ags_sound_container_get_sublevel_name (AgsSoundContainer *sound_container);

Get sublevel names.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the string vector containing sublevel names.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_sound_container_level_up ()

guint
ags_sound_container_level_up (AgsSoundContainer *sound_container,
                              guint level_count);

Level up.

Parameters

sound_container

the AgsSoundcontainer

 

level_count

the count of levels to go up

 

Returns

the level count went up

Since: 3.0.0


ags_sound_container_select_level_by_id ()

guint
ags_sound_container_select_level_by_id
                               (AgsSoundContainer *sound_container,
                                gchar *level_id);

Select level by id.

Parameters

sound_container

the AgsSoundcontainer

 

level_id

the level id as string

 

Returns

the index of level as unsigned integer

Since: 3.0.0


ags_sound_container_select_level_by_index ()

guint
ags_sound_container_select_level_by_index
                               (AgsSoundContainer *sound_container,
                                guint level_index);

Select level by index.

Parameters

sound_container

the AgsSoundcontainer

 

level_index

the level index unsigned integer

 

Returns

the index of level as unsigned integer

Since: 3.0.0


ags_sound_container_get_resource_all ()

GList *
ags_sound_container_get_resource_all (AgsSoundContainer *sound_container);

Get all resources as a GList.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the GList containing AgsResource.

[element-type GObject][transfer full]

Since: 3.0.0


ags_sound_container_get_resource_by_name ()

GList *
ags_sound_container_get_resource_by_name
                               (AgsSoundContainer *sound_container,
                                gchar *resource_name);

Get resources by name as a GList.

Parameters

sound_container

the AgsSoundcontainer

 

resource_name

the resource name

 

Returns

the GList containing AgsResource.

[element-type GObject][transfer full]

Since: 3.0.0


ags_sound_container_get_resource_by_index ()

GList *
ags_sound_container_get_resource_by_index
                               (AgsSoundContainer *sound_container,
                                guint resource_index);

Get resources by index as a GList.

Parameters

sound_container

the AgsSoundcontainer

 

resource_index

the index

 

Returns

the GList containing AgsResource.

[element-type GObject][transfer full]

Since: 3.0.0


ags_sound_container_get_resource_current ()

GList *
ags_sound_container_get_resource_current
                               (AgsSoundContainer *sound_container);

Get resources by index as a GList.

Parameters

sound_container

the AgsSoundcontainer

 

Returns

the GList containing AgsResource.

[element-type GObject][transfer full]

Since: 3.0.0


ags_sound_container_close ()

void
ags_sound_container_close (AgsSoundContainer *sound_container);

Close sound_container .

Parameters

sound_container

the AgsSoundcontainer

 

Since: 3.0.0


AGS_IS_SOUND_CONTAINER()

#define AGS_IS_SOUND_CONTAINER(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_SOUND_CONTAINER))

AGS_IS_SOUND_CONTAINER_INTERFACE()

#define AGS_IS_SOUND_CONTAINER_INTERFACE(vtable)    (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_SOUND_CONTAINER))

AGS_SOUND_CONTAINER()

#define AGS_SOUND_CONTAINER(obj)                    (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOUND_CONTAINER, AgsSoundContainer))

AGS_SOUND_CONTAINER_GET_INTERFACE()

#define AGS_SOUND_CONTAINER_GET_INTERFACE(obj)      (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_SOUND_CONTAINER, AgsSoundContainerInterface))

AGS_SOUND_CONTAINER_INTERFACE()

#define AGS_SOUND_CONTAINER_INTERFACE(vtable)       (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_SOUND_CONTAINER, AgsSoundContainerInterface))

ags_sound_container_get_type ()

GType
ags_sound_container_get_type ();

Types and Values

AGS_TYPE_SOUND_CONTAINER

#define AGS_TYPE_SOUND_CONTAINER                    (ags_sound_container_get_type())

AgsSoundContainer

typedef struct _AgsSoundContainer AgsSoundContainer;

struct AgsSoundContainerInterface

struct AgsSoundContainerInterface {
  GTypeInterface ginterface;

  gboolean (*open)(AgsSoundContainer *sound_container, gchar *filename);

  /* level information */
  guint (*get_level_count)(AgsSoundContainer *sound_container);
  guint (*get_nesting_level)(AgsSoundContainer *sound_container);

  gchar* (*get_level_id)(AgsSoundContainer *sound_container);
  guint (*get_level_index)(AgsSoundContainer *sound_container);

  gchar** (*get_sublevel_name)(AgsSoundContainer *sound_container);

  /* levels */
  guint (*level_up)(AgsSoundContainer *sound_container,
		    guint level_count);
  guint (*select_level_by_id)(AgsSoundContainer *sound_container,
			      gchar *level_id);
  guint (*select_level_by_index)(AgsSoundContainer *sound_container,
				 guint level_index);

  /* get sound resource */
  GList* (*get_resource_all)(AgsSoundContainer *sound_container);
  GList* (*get_resource_by_name)(AgsSoundContainer *sound_container,
				 gchar *resource_name);
  GList* (*get_resource_by_index)(AgsSoundContainer *sound_container,
				  guint resource_index);
  GList* (*get_resource_current)(AgsSoundContainer *sound_container);

  /* close */
  void (*close)(AgsSoundContainer *sound_container);
};