Copyright | © 2015–2017 Mark Karpov |
---|---|
License | BSD 3 clause |
Maintainer | Mark Karpov <markkarpov92@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Sound.HTagLib.Type
Description
Definitions of types used to represent various tags and audio properties.
- data Title
- mkTitle :: Text -> Title
- unTitle :: Title -> Text
- data Artist
- mkArtist :: Text -> Artist
- unArtist :: Artist -> Text
- data Album
- mkAlbum :: Text -> Album
- unAlbum :: Album -> Text
- data Comment
- mkComment :: Text -> Comment
- unComment :: Comment -> Text
- data Genre
- mkGenre :: Text -> Genre
- unGenre :: Genre -> Text
- data Year
- mkYear :: Int -> Maybe Year
- unYear :: Year -> Int
- data TrackNumber
- mkTrackNumber :: Int -> Maybe TrackNumber
- unTrackNumber :: TrackNumber -> Int
- data Duration
- mkDuration :: Int -> Maybe Duration
- unDuration :: Duration -> Int
- data BitRate
- mkBitRate :: Int -> Maybe BitRate
- unBitRate :: BitRate -> Int
- data SampleRate
- mkSampleRate :: Int -> Maybe SampleRate
- unSampleRate :: SampleRate -> Int
- data Channels
- mkChannels :: Int -> Maybe Channels
- unChannels :: Channels -> Int
- data FileType
- data ID3v2Encoding
- data HTagLibException
Documentation
mkTrackNumber :: Int -> Maybe TrackNumber #
Construction of TrackNumber
type, non-positive values result in
Nothing
.
unTrackNumber :: TrackNumber -> Int #
Convert TrackNumber
to Int
.
mkDuration :: Int -> Maybe Duration #
mkSampleRate :: Int -> Maybe SampleRate #
Construction of SampleRate
values, non-positive values result in
Nothing
.
unSampleRate :: SampleRate -> Int #
Convert SampleRate
to Int
.
Number of channels in the audio stream.
mkChannels :: Int -> Maybe Channels #
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.
data ID3v2Encoding #
Encoding for ID3v2 frames that are written to tags.
Constructors
ID3v2Latin1 | Latin1 |
ID3v2UTF16 | UTF-16 |
ID3v2UTF16BE | UTF-16 big endian |
ID3v2UTF8 | UTF-8 |
Instances
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 |
Instances