Copyright | © 2015 Mark Karpov |
---|---|
License | BSD 3 clause |
Maintainer | Mark Karpov <markkarpov@opmbx.org> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
High-level applicative interface for reading of audio meta data. You don't need to import this module directly, import Sound.HTagLib instead.
- data TagGetter a
- getTags :: FilePath -> TagGetter a -> IO a
- getTags' :: FilePath -> FileType -> TagGetter a -> IO a
- titleGetter :: TagGetter Title
- artistGetter :: TagGetter Artist
- albumGetter :: TagGetter Album
- commentGetter :: TagGetter Comment
- genreGetter :: TagGetter Genre
- yearGetter :: TagGetter (Maybe Year)
- trackNumberGetter :: TagGetter (Maybe TrackNumber)
- durationGetter :: TagGetter Duration
- bitRateGetter :: TagGetter BitRate
- sampleRateGetter :: TagGetter SampleRate
- channelsGetter :: TagGetter Channels
Documentation
getTags path g
will try to read file located at path
and read meta
data of the file using getter g
. Type of file will be guessed from its
extension. If this is not satisfactory and you want to explicitly specify
file type, see getTags'
variation of this function.
In case of trouble HTagLibException
will be thrown.
Built-in getters
titleGetter :: TagGetter Title Source
Getter to retrieve track title.
artistGetter :: TagGetter Artist Source
Getter to retrieve track artist.
albumGetter :: TagGetter Album Source
Getter to retrieve track album.
commentGetter :: TagGetter Comment Source
Getter to retrieve track comment.
genreGetter :: TagGetter Genre Source
Getter to retrieve genre of the track.
yearGetter :: TagGetter (Maybe Year) Source
Getter to retrieve year to the track (returns Nothing
if the data is
missing).
trackNumberGetter :: TagGetter (Maybe TrackNumber) Source
Getter to retrieve track number (returns Nothing
if the data is
missing).
durationGetter :: TagGetter Duration Source
Getter to retrieve duration in seconds.
bitRateGetter :: TagGetter BitRate Source
Getter to retrieve bit rate.
sampleRateGetter :: TagGetter SampleRate Source
Getter to retrieve sample rate.
channelsGetter :: TagGetter Channels Source
Getter to retrieve number of channels in audio data.