From: PHO Date: Fri, 15 Jul 2011 09:56:57 +0000 (+0900) Subject: still working on getWordsLossless... X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=a6664b7d7116febf16a1f8ec9ce6938ae80a5283;p=wavpack.git still working on getWordsLossless... --- diff --git a/Codec/Audio/WavPack/Words.hs b/Codec/Audio/WavPack/Words.hs index fb08b5e..0888718 100644 --- a/Codec/Audio/WavPack/Words.hs +++ b/Codec/Audio/WavPack/Words.hs @@ -73,9 +73,11 @@ getWordsLossless isMono w0 bs0 nSamples0 | otherwise = error "FIXME" where - c ∷ EntropyData - c | n `rem` 2 ≡ 0 = fst $ wdEntropyData w - | otherwise = snd $ wdEntropyData w + entropy ∷ EntropyData + entropy + | isMono = fst $ wdEntropyData w + | n `rem` 2 ≡ 0 = fst $ wdEntropyData w + | otherwise = snd $ wdEntropyData w -- | Read a single unsigned value from the specified bitstream with a -- value from 0 to maxCode. If there are exactly a power of two number