From: PHO Date: Tue, 11 Jan 2011 06:26:00 +0000 (+0900) Subject: WVBitstream should have BitString X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=e7d7bed418f63de393b316b2b4246f44752b5743;p=wavpack.git WVBitstream should have BitString --- diff --git a/Codec/Audio/WavPack/Metadata.hs b/Codec/Audio/WavPack/Metadata.hs index def1cb3..fcd873b 100644 --- a/Codec/Audio/WavPack/Metadata.hs +++ b/Codec/Audio/WavPack/Metadata.hs @@ -20,6 +20,7 @@ module Codec.Audio.WavPack.Metadata , Unknown(..) ) where +import qualified Codec.Audio.WavPack.BitString as B import Codec.Audio.WavPack.Internal import Control.Monad import Data.Binary @@ -274,17 +275,17 @@ instance Binary EntropyVars where -- | WV Bitstream data WVBitstream = WVBitstream { - wvStream ∷ !L.ByteString + wvStream ∷ !B.BitString } deriving (Eq, Show, Typeable) instance Metadata WVBitstream where metaID _ = 0x0A - metaSize = fromIntegral ∘ L.length ∘ wvStream + metaSize = (`div` 8) ∘ B.length ∘ wvStream instance Binary WVBitstream where - put = putLazyByteString ∘ wvStream - get = fmap WVBitstream getRemainingLazyByteString + put = putLazyByteString ∘ B.toByteString ∘ wvStream + get = fmap (WVBitstream ∘ B.fromByteString) getRemainingLazyByteString -- | RIFF header for .wav files (before audio) data RIFFHeader