-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | An FFI layer over TagLib's C bindings -- -- Provides functions for reading and writing metadata for a variety of -- common audio formats. Currently supports both ID3v1 and ID3v2 for MP3 -- files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, -- MPC, Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files. It also -- handles management of taglib files and strings, automatically freeing -- allocations when computation is finished. @package taglib-api @version 0.1.1.1 module Audio.TagLib -- | Run a TagLib block. Save and free any files left open when -- the block is finished, and free all strings produced by taglib. taglib :: TagLib a -> IO a -- | Embed an IO action in the TagLib context. io :: IO a -> TagLib a -- | Open a file and return a corresponding FileId. Internally, -- this grabs the Tag and AudioProperties pointers to the TagLib_File. openFile :: FilePath -> TagLib FileId -- | Monad for performing TagLib operations newtype TagLib a TagLib :: StateT TagLibEnv IO a -> TagLib a unTagLib :: TagLib a -> StateT TagLibEnv IO a -- | A handle for an open file data FileId -- | Get the track title. getTitle :: FileId -> TagLib Text -- | Set the track title. setTitle :: FileId -> Text -> TagLib () -- | Get the artist name. getArtist :: FileId -> TagLib Text -- | Set the artist name. setArtist :: FileId -> Text -> TagLib () -- | Get the album name. getAlbum :: FileId -> TagLib Text -- | Set the album name. setAlbum :: FileId -> Text -> TagLib () -- | Get the contents of the comment field. getComment :: FileId -> TagLib Text -- | Set the comment field. setComment :: FileId -> Text -> TagLib () -- | Get the contents of the genre field. getGenre :: FileId -> TagLib Text -- | Set the genre field. setGenre :: FileId -> Text -> TagLib () -- | Get the release year. getYear :: FileId -> TagLib Int -- | Set the release year. setYear :: FileId -> Int -> TagLib () -- | Get the track number. getTrack :: FileId -> TagLib Int -- | Set the track number. setTrack :: FileId -> Int -> TagLib () -- | Retrieves the duration of the given file, in seconds. getLength :: FileId -> TagLib Int -- | Retrieves the bitrate of the given file, in kb/s. getBitrate :: FileId -> TagLib Int -- | Retrieves the sample rate of the given file, in Hz. getSampleRate :: FileId -> TagLib Int -- | Retrieves the number of channels in the given file. getChannels :: FileId -> TagLib Int instance Typeable TagLibException instance Eq FileId instance Ord FileId instance Show TagLibException instance Exception TagLibException instance Applicative TagLib instance Monad TagLib instance Functor TagLib