]> gitweb @ CieloNegro.org - wavpack.git/blob - examples/WvInfo.hs
78588ab29d3e3f6e5cdf12f09f3a9124eacc824f
[wavpack.git] / examples / WvInfo.hs
1 {-# LANGUAGE
2     UnicodeSyntax
3   #-}
4 module Main where
5 import Codec.Audio.WavPack.Block
6 import qualified Data.ByteString.Lazy as L
7 import System.Environment
8
9 main ∷ IO ()
10 main = do [wvFile] ← getArgs
11           wvStream ← L.readFile wvFile
12           showWvInfo wvStream
13
14 showWvInfo ∷ L.ByteString → IO ()
15 showWvInfo stream
16     = case findNextHeader stream of
17         (Just bh, _)
18             → print bh
19         _   → fail "Can't find any WavPack block headers."