Audio.GetOggTags

table Audio.GetOggTags ( 

number Channel )

Example 1

tOggInfo = Audio.GetOggTags(CHANNEL_USER1);
Title = tOggInfo.TITLE;

Gets the Ogg tag information from the Ogg file currently loaded into CHANNEL_USER1 and stores it in a table called "tOggInfo."  The track title is then accessed from the table and stored in the variable "Title."

Example 2

-- Load an Ogg Vorbis audio file into a channel
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\ShortSong.ogg", false, false);

-- Make sure the Load action was successful
if (Application.GetLastError() == 0) then

    -- Check for file description tags
    tags = Audio.GetOggTags(CHANNEL_NARRATION);
    if (tags ~= nil) then
        albumtitle = tags.TITLE;
        artist = tags.ARTIST;
        album = tags.ALBUM;
    end

    -- Tell the channel to start playing the audio track
    Audio.Play(CHANNEL_NARRATION);
end

This example first loads an Ogg Vorbis audio file into the narration audio channel. Once loaded, the description tags are read using the Audio.GetOggTags action and stored in a table called "tags. Three of these tags are then accessed from the table and stored in variables.

See also: Related Actions