htaglib-1.1.1: Bindings to TagLib, audio meta-data library

Copyright© 2015–2017 Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov92@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Sound.HTagLib.Type

Description

Definitions of types used to represent various tags and audio properties.

Synopsis

Documentation

data Title #

Title tag.

Instances

Eq Title # 

Methods

(==) :: Title -> Title -> Bool #

(/=) :: Title -> Title -> Bool #

Ord Title # 

Methods

compare :: Title -> Title -> Ordering #

(<) :: Title -> Title -> Bool #

(<=) :: Title -> Title -> Bool #

(>) :: Title -> Title -> Bool #

(>=) :: Title -> Title -> Bool #

max :: Title -> Title -> Title #

min :: Title -> Title -> Title #

Show Title # 

Methods

showsPrec :: Int -> Title -> ShowS #

show :: Title -> String #

showList :: [Title] -> ShowS #

IsString Title # 

Methods

fromString :: String -> Title #

mkTitle :: Text -> Title #

Construction of Title type, null bytes are converted to spaces.

unTitle :: Title -> Text #

Convert Title to Text.

data Artist #

Artist tag.

mkArtist :: Text -> Artist #

Construction of Artist type, null bytes are converted to spaces.

unArtist :: Artist -> Text #

Convert Artist to Text.

data Album #

Album tag.

Instances

Eq Album # 

Methods

(==) :: Album -> Album -> Bool #

(/=) :: Album -> Album -> Bool #

Ord Album # 

Methods

compare :: Album -> Album -> Ordering #

(<) :: Album -> Album -> Bool #

(<=) :: Album -> Album -> Bool #

(>) :: Album -> Album -> Bool #

(>=) :: Album -> Album -> Bool #

max :: Album -> Album -> Album #

min :: Album -> Album -> Album #

Show Album # 

Methods

showsPrec :: Int -> Album -> ShowS #

show :: Album -> String #

showList :: [Album] -> ShowS #

IsString Album # 

Methods

fromString :: String -> Album #

mkAlbum :: Text -> Album #

Construction of Album type, null bytes are converted to spaces.

unAlbum :: Album -> Text #

Convert Album to Text.

mkComment :: Text -> Comment #

Construction of Comment type, null bytes are converted to spaces.

unComment :: Comment -> Text #

Convert Comment to Text.

data Genre #

Genre tag.

Instances

Eq Genre # 

Methods

(==) :: Genre -> Genre -> Bool #

(/=) :: Genre -> Genre -> Bool #

Ord Genre # 

Methods

compare :: Genre -> Genre -> Ordering #

(<) :: Genre -> Genre -> Bool #

(<=) :: Genre -> Genre -> Bool #

(>) :: Genre -> Genre -> Bool #

(>=) :: Genre -> Genre -> Bool #

max :: Genre -> Genre -> Genre #

min :: Genre -> Genre -> Genre #

Show Genre # 

Methods

showsPrec :: Int -> Genre -> ShowS #

show :: Genre -> String #

showList :: [Genre] -> ShowS #

IsString Genre # 

Methods

fromString :: String -> Genre #

mkGenre :: Text -> Genre #

Construction of Genre type, null bytes are converted to spaces.

unGenre :: Genre -> Text #

Convert Genre to Text.

data Year #

Year tag.

Instances

Eq Year # 

Methods

(==) :: Year -> Year -> Bool #

(/=) :: Year -> Year -> Bool #

Ord Year # 

Methods

compare :: Year -> Year -> Ordering #

(<) :: Year -> Year -> Bool #

(<=) :: Year -> Year -> Bool #

(>) :: Year -> Year -> Bool #

(>=) :: Year -> Year -> Bool #

max :: Year -> Year -> Year #

min :: Year -> Year -> Year #

Show Year # 

Methods

showsPrec :: Int -> Year -> ShowS #

show :: Year -> String #

showList :: [Year] -> ShowS #

mkYear :: Int -> Maybe Year #

Construction of Year type, non-positive values result in Nothing.

unYear :: Year -> Int #

Convert Year to Int.

mkTrackNumber :: Int -> Maybe TrackNumber #

Construction of TrackNumber type, non-positive values result in Nothing.

mkDuration :: Int -> Maybe Duration #

Construction of Duration values, negative values result in Nothing.

unDuration :: Duration -> Int #

Convert Duration to Int.

data BitRate #

Bit rate in kb/s.

mkBitRate :: Int -> Maybe BitRate #

Construction of BitRate values, negative values result in Nothing.

unBitRate :: BitRate -> Int #

Convert BitRate to Int.

mkSampleRate :: Int -> Maybe SampleRate #

Construction of SampleRate values, non-positive values result in Nothing.

data Channels #

Number of channels in the audio stream.

mkChannels :: Int -> Maybe Channels #

Construction of Channels values, non-positive values result in Nothing.

unChannels :: Channels -> Int #

Convert Channels to Int.

data FileType #

Types of files TagLib can work with. This may be used to explicitly specify type of file instead of relying on the TagLib's ability to guess type of file from its extension.

Constructors

MPEG

MPEG

OggVorbis

Ogg vorbis

FLAC

FLAC

MPC

MPC

OggFlac

Ogg FLAC

WavPack

Wav pack

Speex

Speex

TrueAudio

True audio

MP4

MP4

ASF

ASF

data HTagLibException #

The data type represents exceptions specific to the library.

Constructors

OpeningFailed FilePath

Attempt to open audio file to read its tags failed

InvalidFile FilePath

File can be opened, but it doesn't contain any information that can be interpreted by the library

SavingFailed FilePath

Saving failed