From 3a71660f491357ec2384203775d6f249877b8850 Mon Sep 17 00:00:00 2001 From: PHO Date: Mon, 3 Jan 2011 12:32:28 +0900 Subject: [PATCH] haddock comments --- Codec/Audio/WavPack/Types.hs | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Codec/Audio/WavPack/Types.hs b/Codec/Audio/WavPack/Types.hs index 2e1446a..5ef2598 100644 --- a/Codec/Audio/WavPack/Types.hs +++ b/Codec/Audio/WavPack/Types.hs @@ -1,6 +1,7 @@ {-# LANGUAGE UnicodeSyntax #-} +-- | Data types for WavPack codec. module Codec.Audio.WavPack.Types ( BlockHeader(..) ) @@ -9,16 +10,28 @@ import Data.Binary import Data.Binary.Get import Data.Binary.Put +-- | The preamble to every block in both the .wv and .wvc files. data BlockHeader = BlockHeader { + -- | size of entire block (minus 8, of course) bhSize ∷ !Word32 + -- | 0x402 to 0x410 are currently valid for decode , bhVersion ∷ !Word16 + -- | track number (0 if not used, like now) , bhTrackNo ∷ !Word8 + -- | track sub-index (0 if not used, like now) , bhIndexNo ∷ !Word8 + -- | total samples for entire file, but this is only valid if + -- 'bhBlockIndex' == 0 and a value of -1 indicates unknown length , bhTotalSamples ∷ !Word32 + -- | index of first sample in block relative to beginning of + -- file (normally this would start at 0 for the first block) , bhBlockIndex ∷ !Word32 + -- | number of samples in this block (0 = no audio) , bhBlockSamples ∷ !Word32 + -- | various flags for id and decoding , bhFlags ∷ !Word32 + -- | crc for actual decoded data , bhCRC ∷ !Word32 } deriving (Show, Eq) @@ -60,22 +73,3 @@ instance Binary BlockHeader where , bhFlags = flags , bhCRC = crc } - -{- -typedef struct { - char ckID [4]; // "wvpk" - uint32_t ckSize; // size of entire block (minus 8, of course) - uint16_t version; // 0x402 to 0x410 are currently valid for decode - uchar track_no; // track number (0 if not used, like now) - uchar index_no; // track sub-index (0 if not used, like now) - uint32_t total_samples; // total samples for entire file, but this is - // only valid if block_index == 0 and a value of - // -1 indicates unknown length - uint32_t block_index; // index of first sample in block relative to - // beginning of file (normally this would start - // at 0 for the first block) - uint32_t block_samples; // number of samples in this block (0 = no audio) - uint32_t flags; // various flags for id and decoding - uint32_t crc; // crc for actual decoded data -} WavpackHeader; --} -- 2.40.0