, Unknown(..)
)
where
+import qualified Codec.Audio.WavPack.BitString as B
import Codec.Audio.WavPack.Internal
import Control.Monad
import Data.Binary
-- | 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