libtagc-0.11.1: Binding to TagLib C library.

Audio.TagLib.TagLib

Contents

Synopsis

Types

type Tag = TagPtrSource

type AudioProperties = AudioPropertiesPtrSource

TagFile operations

tagFileOpen :: ByteString -> IO (Maybe TagFile)Source

Creates a TagFile file based on filename, TagLib will try to guess the file type. Return Nothing if the file type cannot be determined or the file cannot opened.

tagFileSave :: TagFile -> IO BoolSource

Save file to disk.

tagFileIsValid :: TagFile -> IO BoolSource

Returns True if the file is open and readble and valid information for the Tag and AudioProperties was found.

tagFileGetTag :: TagFile -> IO (Maybe Tag)Source

Returns Tag associated with this file.

Tag operations

tagGetAlbum :: Tag -> IO StringSource

Returns a string with this tag's album.

NOTE: by default this string should be UTF8 encoded.

tagSetAlbum :: Tag -> String -> IO ()Source

Set tag's album.

NOTE: by default this string should be UTF8 encoded.

tagGetArtist :: Tag -> IO StringSource

Returns a string with this tag's artist.

NOTE: by default this string should be UTF8 encoded.

tagSetArtist :: Tag -> String -> IO ()Source

Set tag's artist.

NOTE: by default this string should be UTF8 encoded.

tagGetComment :: Tag -> IO StringSource

Returns a string with this tag's comment.

NOTE: by default this string should be UTF8 encoded.

tagSetComment :: Tag -> String -> IO ()Source

Set tag's comment.

NOTE: by default this string should be UTF8 encoded.

tagGetGenre :: Tag -> IO StringSource

Returns a string with this tag's genre.

NOTE: by default this string should be UTF8 encoded.

tagSetGenre :: Tag -> String -> IO ()Source

Set tag's genre.

NOTE: by default this string should be UTF8 encoded.

tagGetTitle :: Tag -> IO StringSource

Returns a string with this tag's title.

NOTE: by default this string should be UTF8 encoded.

tagSetTitle :: Tag -> String -> IO ()Source

Set tag's title.

NOTE: by default this string should be UTF8 encoded.

tagGetTrack :: Tag -> IO IntSource

Returns a string with this tag's track.

NOTE: by default this string should be UTF8 encoded.

tagSetTrack :: Tag -> Int -> IO ()Source

Set tag's track.

NOTE: by default this string should be UTF8 encoded.

tagGetYear :: Tag -> IO IntSource

Returns a string with this tag's year.

NOTE: by default this string should be UTF8 encoded.

tagSetYear :: Tag -> Int -> IO ()Source

Set tag's year.

NOTE: by default this string should be UTF8 encoded.

AudioProperties Operations

audioPropertiesGetBitRate :: AudioProperties -> IO IntSource

Returns the bitrate of the file in kb/s.

audioPropertiesGetDuration :: AudioProperties -> IO IntSource

Returns the duration of the file in seconds.

audioPropertiesGetSampleRate :: AudioProperties -> IO IntSource

Returns the sample rate of the file in Hz.

audioPropertiesGetChannels :: AudioProperties -> IO IntSource

Returns the number of channels in the audio stream.