-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Haskell binding to TagLib
--
-- This is a Haskell binding to TagLib. TagLib is a popular library for
-- reading and writing tags (ID3) of media files and getting audio
-- properties from audio files. TagLib homepage:
-- http:developer.kde.org~wheelertaglib.html
@package taglib
@version 0.1.0
-- | High level interface to read and write ID3 tag fields (album, artist,
-- comment, genre, title, track number, year) and get audio properties
-- (length, bit rate, sample rate, channels)
module Sound.TagLib
data AudioProperties
data Tag
type TagFile = ForeignPtr Void
-- | Open a filename and possibly get a TagFile
open :: String -> IO (Maybe TagFile)
-- | Save changes to a tag
save :: TagFile -> IO Integer
-- | Get a Tag from a TagFile, if it has one
tag :: TagFile -> IO (Maybe Tag)
-- | Get an album string from a Tag
album :: Tag -> IO String
-- | Get an artist string from a Tag
artist :: Tag -> IO String
-- | Get the comment string from a Tag
comment :: Tag -> IO String
-- | Get the comment string from a Tag
genre :: Tag -> IO String
-- | Set the album of a tag
setAlbum :: Tag -> String -> IO ()
-- | Set the artist of a tag
setArtist :: Tag -> String -> IO ()
-- | Set the comment of a tag
setComment :: Tag -> String -> IO ()
-- | Set the genre of a tag
setGenre :: Tag -> String -> IO ()
-- | Set the track of a tag
setTrack :: Tag -> Integer -> IO ()
-- | Set the year of a tag
setYear :: Tag -> Integer -> IO ()
-- | Get a title string from a Tag
title :: Tag -> IO String
-- | Get the track number from a Tag. Empty values will be 0
track :: Tag -> IO Integer
-- | Get the year from a Tag. Empty values will be 0
year :: Tag -> IO Integer
-- | Get the AudioProperties from a TagFile
audioProperties :: TagFile -> IO (Maybe AudioProperties)
-- | Get the bitRate from AudioProperties
bitRate :: AudioProperties -> IO Integer
-- | Get the number of channels from AudioProperties
channels :: AudioProperties -> IO Integer
-- | Get the duration (in seconds) from AudioProperties In TagLib, this is
-- named length. This is renamed so that it doesn't conflict with the
-- Prelude length
duration :: AudioProperties -> IO Integer
-- | Get the sampleRate from AudioProperties
sampleRate :: AudioProperties -> IO Integer