GrlMediaAudio

## GrlMediaAudio GrlMediaAudio — A multimedia data for audio |

## Functions

GrlMedia * | grl_media_audio_new ()
void | grl_media_audio_add_artist ()
void | grl_media_audio_add_genre ()
void | grl_media_audio_add_lyrics ()
void | grl_media_audio_add_url_data ()
const gchar * | grl_media_audio_get_album ()
const gchar * | grl_media_audio_get_artist ()
const gchar * | grl_media_audio_get_artist_nth ()
gint | grl_media_audio_get_bitrate ()
const gchar * | grl_media_audio_get_genre ()
const gchar * | grl_media_audio_get_genre_nth ()
const gchar * | grl_media_audio_get_lyrics ()
const gchar * | grl_media_audio_get_lyrics_nth ()
const gchar * | grl_media_audio_get_mb_album_id ()
gint | grl_media_audio_get_track_number ()
const gchar * | grl_media_audio_get_url_data ()
const gchar * | grl_media_audio_get_url_data_nth ()
void | grl_media_audio_set_album ()
void | grl_media_audio_set_artist ()
void | grl_media_audio_set_bitrate ()
void | grl_media_audio_set_genre ()
void | grl_media_audio_set_lyrics ()
void | grl_media_audio_set_mb_album_id ()
void | grl_media_audio_set_track_number ()
void | grl_media_audio_set_url_data ()

## Types and Values

struct | GrlMediaAudio
struct | GrlMediaAudioClass

## Object Hierarchy

        GObject
        ╰── GrlData
            ╰── GrlMedia
                ╰── GrlMediaAudio

## Includes

    #include <grilo.h>

## Description

This high level class represents an audio multimedia item. It has methods to set and get properties like artist, album, and so on.

## Functions

### grl_media_audio_new ()

    GrlMedia *
    grl_media_audio_new (void);

Creates a new data audio object.

#### Returns

a newly-allocated data audio.

Since 0.1.4

### grl_media_audio_add_artist ()

    void
    grl_media_audio_add_artist (GrlMediaAudio *audio,
                                const gchar *artist);

Adds a new artist to `audio` .

#### Parameters

audio | the media instance |
artist | an audio's artist |

Since 0.1.10

### grl_media_audio_add_genre ()

    void
    grl_media_audio_add_genre (GrlMediaAudio *audio,
                               const gchar *genre);

Adds a new genre to `audio` .

#### Parameters

audio | the media instance |
genre | an audio's genre |

Since 0.1.10

### grl_media_audio_add_lyrics ()

    void
    grl_media_audio_add_lyrics (GrlMediaAudio *audio,
                                const gchar *lyrics);

Adds a new lyrics to `audio` .

#### Parameters

audio | the media instance |
lyrics | an audio's lyrics |

Since 0.1.10

### grl_media_audio_add_url_data ()

    void
    grl_media_audio_add_url_data (GrlMediaAudio *audio,
                                  const gchar *url,
                                  const gchar *mime,
                                  gint bitrate);

Sets all the keys related with the URL of a media resource and adds it to `audio` (useful for resources with more than one URL).

#### Parameters

audio | the media instance |
url | an audio's url |
mime | the `url` mime-type |
bitrate | the `url` bitrate, or -1 to ignore |

Since 0.1.10

### grl_media_audio_get_album ()

    const gchar *
    grl_media_audio_get_album (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the album of the audio

Since 0.1.4

### grl_media_audio_get_artist ()

    const gchar *
    grl_media_audio_get_artist (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the artist of the audio

Since 0.1.4

### grl_media_audio_get_artist_nth ()

    const gchar *
    grl_media_audio_get_artist_nth (GrlMediaAudio *audio,
                                    guint index);

#### Parameters

audio | the media instance |
index | element to retrieve, starting at 0 |

#### Returns

the n-th artist of the audio

Since 0.1.10

### grl_media_audio_get_bitrate ()

    gint
    grl_media_audio_get_bitrate (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the bitrate of the audio

Since 0.1.4

### grl_media_audio_get_genre ()

    const gchar *
    grl_media_audio_get_genre (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the genre of the audio

Since 0.1.4

### grl_media_audio_get_genre_nth ()

    const gchar *
    grl_media_audio_get_genre_nth (GrlMediaAudio *audio,
                                   guint index);

#### Parameters

audio | the media instance |
index | element to retrieve, starting at 0 |

#### Returns

the n-th genre of the audio

Since 0.1.10

### grl_media_audio_get_lyrics ()

    const gchar *
    grl_media_audio_get_lyrics (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the lyrics of the audio

Since 0.1.4

### grl_media_audio_get_lyrics_nth ()

    const gchar *
    grl_media_audio_get_lyrics_nth (GrlMediaAudio *audio,
                                    guint index);

#### Parameters

audio | the media instance |
index | element to retrieve, starting at 0 |

#### Returns

the n-th lyrics of the audio

Since 0.1.10

### grl_media_audio_get_mb_album_id ()

    const gchar *
    grl_media_audio_get_mb_album_id (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the MusicBrainz album identifier

Since 0.2.11

### grl_media_audio_get_track_number ()

    gint
    grl_media_audio_get_track_number (GrlMediaAudio *audio);

#### Parameters

audio | the media instance |

#### Returns

the track number of the audio

### grl_media_audio_get_url_data ()

    const gchar *
    grl_media_audio_get_url_data (GrlMediaAudio *audio,
                                  gchar **mime,
                                  gint *bitrate);

#### Parameters

audio | the media instance |
mime | the url mime-type, or `NULL` to ignore. | [out][transfer none]
bitrate | the url bitrate, or `NULL` to ignore. | [out]

#### Returns

all the keys related with the URL of an audio resource in one go.

Since 0.1.10

### grl_media_audio_get_url_data_nth ()

    const gchar *
    grl_media_audio_get_url_data_nth (GrlMediaAudio *audio,
                                      guint index,
                                      gchar **mime,
                                      gint *bitrate);

#### Parameters

audio | the media instance |
index | element to retrieve, starting at 0 |
mime | the url mime-type, or `NULL` to ignore. | [out][transfer none]
bitrate | the url bitrate, or `NULL` to ignore. | [out]

#### Returns

all the keys related with the URL number `index` of an audio resource in one go.

Since 0.1.10

### grl_media_audio_set_album ()

    void
    grl_media_audio_set_album (GrlMediaAudio *audio,
                               const gchar *album);

Set the album of the audio

#### Parameters

audio | the media instance |
album | the audio's album |

Since 0.1.4

### grl_media_audio_set_artist ()

    void
    grl_media_audio_set_artist (GrlMediaAudio *audio,
                                const gchar *artist);

Set the artist of the audio

#### Parameters

audio | the media instance |
artist | the audio's artist |

Since 0.1.4

### grl_media_audio_set_bitrate ()

    void
    grl_media_audio_set_bitrate (GrlMediaAudio *audio,
                                 gint bitrate);

Set the bitrate of the audio

#### Parameters

audio | the media instance |
bitrate | the audio's bitrate |

Since 0.1.4

### grl_media_audio_set_genre ()

    void
    grl_media_audio_set_genre (GrlMediaAudio *audio,
                               const gchar *genre);

Set the genre of the audio

#### Parameters

audio | the media instance |
genre | the audio's genre |

Since 0.1.4

### grl_media_audio_set_lyrics ()

    void
    grl_media_audio_set_lyrics (GrlMediaAudio *audio,
                                const gchar *lyrics);

Set the lyrics of the audio

#### Parameters

audio | the media instance |
lyrics | the audio's lyrics |

Since 0.1.4

### grl_media_audio_set_mb_album_id ()

    void
    grl_media_audio_set_mb_album_id (GrlMediaAudio *audio,
                                     const gchar *mb_album_id);

Set the MusicBrainz album identifier of the audio

#### Parameters

audio | the media instance |
mb_album_id | the MusicBrainz album identifier |

Since 0.2.11

### grl_media_audio_set_track_number ()

    void
    grl_media_audio_set_track_number (GrlMediaAudio *audio,
                                      gint track_number);

Set the track number of the audio

#### Parameters

audio | the media instance |
track_number | the audio's track number |

### grl_media_audio_set_url_data ()

    void
    grl_media_audio_set_url_data (GrlMediaAudio *audio,
                                  const gchar *url,
                                  const gchar *mime,
                                  gint bitrate);

Sets all the keys related with the URL of an audio resource in one go.

#### Parameters

audio | the media instance |
url | the audio's url |
mime | the `url` mime-type |
bitrate | the `url` bitrate, or -1 to ignore |

Since 0.1.10

## Types and Values

### struct GrlMediaAudio

    struct GrlMediaAudio;

### struct GrlMediaAudioClass

    struct GrlMediaAudioClass {
      GrlMediaClass parent_class;
    };

Grilo Media audio Class

#### Members

GrlMediaClass `parent_class`; | the parent class structure |

## See Also

GrlConfig, GrlMediaBox, GrlMediaVideo, GrlMediaImage