flac 0.1.2 → 0.2.0
raw patch · 22 files changed
+109/−81 lines, 22 filesdep −data-default-classdep ~bytestringdep ~textdep ~transformersPVP ok
version bump matches the API change (PVP)
Dependencies removed: data-default-class
Dependency ranges changed: bytestring, text, transformers, vector
API changes (from Hackage documentation)
- Codec.Audio.FLAC.Metadata: instance Data.Default.Class.Default Codec.Audio.FLAC.Metadata.MetaSettings
- Codec.Audio.FLAC.StreamDecoder: instance Data.Default.Class.Default Codec.Audio.FLAC.StreamDecoder.DecoderSettings
- Codec.Audio.FLAC.StreamEncoder: instance Data.Default.Class.Default Codec.Audio.FLAC.StreamEncoder.EncoderSettings
+ Codec.Audio.FLAC.Metadata: -- <a>SampleRate</a> is represented by <a>Word32</a> value in this
+ Codec.Audio.FLAC.Metadata: -- <a>Word32</a></tt>.
+ Codec.Audio.FLAC.Metadata: -- library, and so <tt><a>MetaType</a> <a>SampleRate</a> ~
+ Codec.Audio.FLAC.Metadata: -- particular piece of metadata is writable or not.
+ Codec.Audio.FLAC.Metadata: -- | Associated type of the kind <a>Constraint</a> that controls whether a
+ Codec.Audio.FLAC.Metadata: defaultMetaSettings :: MetaSettings
+ Codec.Audio.FLAC.Metadata: infix 1 =->
+ Codec.Audio.FLAC.StreamDecoder: defaultDecoderSettings :: DecoderSettings
+ Codec.Audio.FLAC.StreamEncoder: defaultEncoderSettings :: EncoderSettings
- Codec.Audio.FLAC.Metadata: class MetaValue a where type MetaType a :: * type MetaWritable a :: Constraint _ =-> _ = error "Codec.Audio.FLAC.Metadata.(=->) is not defined" where {
+ Codec.Audio.FLAC.Metadata: class MetaValue a where {
- Codec.Audio.FLAC.Metadata.CueSheet: CueTrack :: !Word64 -> !ByteString -> !Bool -> !Bool -> !(Maybe Word64) -> !(NonEmpty Word64) -> CueTrack
+ Codec.Audio.FLAC.Metadata.CueSheet: CueTrack :: !Word64 -> !ByteString -> !Bool -> !Bool -> !Maybe Word64 -> !NonEmpty Word64 -> CueTrack
- Codec.Audio.FLAC.Metadata.CueSheet: [cueTrackIndices] :: CueTrack -> !(NonEmpty Word64)
+ Codec.Audio.FLAC.Metadata.CueSheet: [cueTrackIndices] :: CueTrack -> !NonEmpty Word64
- Codec.Audio.FLAC.Metadata.CueSheet: [cueTrackPregapIndex] :: CueTrack -> !(Maybe Word64)
+ Codec.Audio.FLAC.Metadata.CueSheet: [cueTrackPregapIndex] :: CueTrack -> !Maybe Word64
- Codec.Audio.FLAC.StreamEncoder: EncoderSettings :: !Word32 -> !Word32 -> !Bool -> !(Maybe Bool) -> !(Maybe Bool) -> !(Maybe (NonEmpty ApodizationFunction)) -> !(Maybe Word32) -> !(Maybe Word32) -> !(Maybe Bool) -> !(Maybe Bool) -> !(Maybe (Word32, Word32)) -> EncoderSettings
+ Codec.Audio.FLAC.StreamEncoder: EncoderSettings :: !Word32 -> !Word32 -> !Bool -> !Maybe Bool -> !Maybe Bool -> !Maybe (NonEmpty ApodizationFunction) -> !Maybe Word32 -> !Maybe Word32 -> !Maybe Bool -> !Maybe Bool -> !Maybe (Word32, Word32) -> EncoderSettings
- Codec.Audio.FLAC.StreamEncoder: [encoderApodization] :: EncoderSettings -> !(Maybe (NonEmpty ApodizationFunction))
+ Codec.Audio.FLAC.StreamEncoder: [encoderApodization] :: EncoderSettings -> !Maybe (NonEmpty ApodizationFunction)
- Codec.Audio.FLAC.StreamEncoder: [encoderDoExhaustiveModelSearch] :: EncoderSettings -> !(Maybe Bool)
+ Codec.Audio.FLAC.StreamEncoder: [encoderDoExhaustiveModelSearch] :: EncoderSettings -> !Maybe Bool
- Codec.Audio.FLAC.StreamEncoder: [encoderDoMidSideStereo] :: EncoderSettings -> !(Maybe Bool)
+ Codec.Audio.FLAC.StreamEncoder: [encoderDoMidSideStereo] :: EncoderSettings -> !Maybe Bool
- Codec.Audio.FLAC.StreamEncoder: [encoderDoQlpCoeffPrecisionSearch] :: EncoderSettings -> !(Maybe Bool)
+ Codec.Audio.FLAC.StreamEncoder: [encoderDoQlpCoeffPrecisionSearch] :: EncoderSettings -> !Maybe Bool
- Codec.Audio.FLAC.StreamEncoder: [encoderLooseMidSideStereo] :: EncoderSettings -> !(Maybe Bool)
+ Codec.Audio.FLAC.StreamEncoder: [encoderLooseMidSideStereo] :: EncoderSettings -> !Maybe Bool
- Codec.Audio.FLAC.StreamEncoder: [encoderMaxLpcOrder] :: EncoderSettings -> !(Maybe Word32)
+ Codec.Audio.FLAC.StreamEncoder: [encoderMaxLpcOrder] :: EncoderSettings -> !Maybe Word32
- Codec.Audio.FLAC.StreamEncoder: [encoderQlpCoeffPrecision] :: EncoderSettings -> !(Maybe Word32)
+ Codec.Audio.FLAC.StreamEncoder: [encoderQlpCoeffPrecision] :: EncoderSettings -> !Maybe Word32
- Codec.Audio.FLAC.StreamEncoder: [encoderResidualPartitionOrders] :: EncoderSettings -> !(Maybe (Word32, Word32))
+ Codec.Audio.FLAC.StreamEncoder: [encoderResidualPartitionOrders] :: EncoderSettings -> !Maybe (Word32, Word32)
- Codec.Audio.FLAC.StreamEncoder.Apodization: PartialTukey :: Natural -> (Maybe (Double, Maybe Double)) -> ApodizationFunction
+ Codec.Audio.FLAC.StreamEncoder.Apodization: PartialTukey :: Natural -> Maybe (Double, Maybe Double) -> ApodizationFunction
- Codec.Audio.FLAC.StreamEncoder.Apodization: PunchoutTukey :: Natural -> (Maybe (Double, Maybe Double)) -> ApodizationFunction
+ Codec.Audio.FLAC.StreamEncoder.Apodization: PunchoutTukey :: Natural -> Maybe (Double, Maybe Double) -> ApodizationFunction
Files
- CHANGELOG.md +6/−0
- Codec/Audio/FLAC/Metadata.hs +15/−11
- Codec/Audio/FLAC/Metadata/CueSheet.hs +1/−1
- Codec/Audio/FLAC/Metadata/Internal/Level2Interface.hs +6/−7
- Codec/Audio/FLAC/Metadata/Internal/Level2Interface/Helpers.hs +3/−5
- Codec/Audio/FLAC/Metadata/Internal/Object.hs +1/−1
- Codec/Audio/FLAC/Metadata/Internal/Types.hs +1/−1
- Codec/Audio/FLAC/StreamDecoder.hs +12/−7
- Codec/Audio/FLAC/StreamDecoder/Internal.hs +6/−6
- Codec/Audio/FLAC/StreamDecoder/Internal/Helpers.hs +3/−1
- Codec/Audio/FLAC/StreamDecoder/Internal/Types.hs +1/−1
- Codec/Audio/FLAC/StreamEncoder.hs +20/−15
- Codec/Audio/FLAC/StreamEncoder/Apodization.hs +1/−1
- Codec/Audio/FLAC/StreamEncoder/Internal.hs +6/−6
- Codec/Audio/FLAC/StreamEncoder/Internal/Helpers.hs +1/−1
- Codec/Audio/FLAC/StreamEncoder/Internal/Types.hs +1/−1
- Codec/Audio/FLAC/Util.hs +1/−1
- LICENSE.md +1/−1
- README.md +1/−2
- flac.cabal +13/−8
- tests/Codec/Audio/FLAC/MetadataSpec.hs +5/−1
- tests/Codec/Audio/FLAC/StreamEncoderSpec.hs +4/−3
CHANGELOG.md view
@@ -1,3 +1,9 @@+## FLAC 0.2.0++* Got rid of `data-default-class` dependency. Now default values for various+ settings are exported explicitly. This may be a breaking change for you if+ use `def`.+ ## FLAC 0.1.2 * Documentation and metadata improvements.
Codec/Audio/FLAC/Metadata.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Metadata--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -77,6 +77,7 @@ ( -- * Metadata manipulation API FlacMeta , MetaSettings (..)+ , defaultMetaSettings , MetaException (..) , MetaChainStatus (..) , runFlacMeta@@ -132,7 +133,6 @@ import Data.Bool (bool) import Data.ByteString (ByteString) import Data.Char (toUpper)-import Data.Default.Class import Data.IORef import Data.List.NonEmpty (NonEmpty (..)) import Data.Maybe (fromJust, listToMaybe)@@ -141,7 +141,6 @@ import Data.Vector (Vector) import Foreign hiding (void) import Numeric.Natural-import Prelude hiding (iterate) import System.IO import qualified Data.ByteString.Char8 as B8 import qualified Data.List.NonEmpty as NE@@ -209,13 +208,18 @@ -- Default value: 'True'. } deriving (Show, Read, Eq, Ord) -instance Default MetaSettings where- def = MetaSettings- { metaAutoVacuum = True- , metaSortPadding = True- , metaUsePadding = True- , metaPreserveFileStats = True }+-- | Default 'MetaSettings'.+--+-- @since 0.2.0 +defaultMetaSettings :: MetaSettings+defaultMetaSettings = MetaSettings+ { metaAutoVacuum = True+ , metaSortPadding = True+ , metaUsePadding = True+ , metaPreserveFileStats = True+ }+ -- | Run an action that manipulates FLAC metadata. 'MetaSettings' control -- subtle and rather low-level details of metadata editing, just pass 'def' -- unless you know what you are doing. 'FilePath' specifies location of FLAC@@ -264,7 +268,7 @@ -- | Type of data that corresponds to this metadata value. For example -- 'SampleRate' is represented by 'Word32' value in this library, and so- -- @'MetaType' 'SampleRate' = 'Word32'@.+ -- @'MetaType' 'SampleRate' ~ 'Word32'@. type MetaType a :: * @@ -282,7 +286,7 @@ -- | Given a value that determines what to write and a value to write, -- add\/replace a piece of metadata information. This is how you edit -- metadata. To delete something, set it to 'Nothing' (well, it should be- -- something that /can be missing/, for example you cannot delete+ -- something that /can be missing/, for example you cannot delete the -- 'SampleRate' attribute). If 'MetaWritable' is defined, this method must -- be defined as well.
Codec/Audio/FLAC/Metadata/CueSheet.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Metadata.CueSheet--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/Metadata/Internal/Level2Interface.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Metadata.Internal.Level2Interface--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -14,6 +14,7 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE LambdaCase #-} module Codec.Audio.FLAC.Metadata.Internal.Level2Interface ( -- * Chain@@ -37,7 +38,6 @@ import Control.Monad.IO.Class (MonadIO (..)) import Foreign.C.String import Foreign.C.Types-import Prelude hiding (iterate) ---------------------------------------------------------------------------- -- Chain@@ -49,11 +49,10 @@ -- 'MetaException' is raised. withChain :: (MetaChain -> IO a) -> IO a-withChain f = bracket chainNew (mapM_ chainDelete) $ \mchain ->- case mchain of- Nothing -> throwM- (MetaGeneralProblem MetaChainStatusMemoryAllocationError)- Just x -> f x+withChain f = bracket chainNew (mapM_ chainDelete) $ \case+ Nothing -> throwM+ (MetaGeneralProblem MetaChainStatusMemoryAllocationError)+ Just x -> f x -- | Create a new 'MetaChain'. In the case of memory allocation problem -- 'Nothing' is returned.
Codec/Audio/FLAC/Metadata/Internal/Level2Interface/Helpers.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Metadata.Internal.Level2Interface.Helpers--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -285,10 +285,8 @@ commentSize <- fromIntegral <$> peek sizePtr if commentPtr == nullPtr then return Nothing- else do- value <- T.drop 1 . T.dropWhile (/= '=') . T.decodeUtf8- <$> B.packCStringLen (commentPtr, commentSize)- return (pure value)+ else Just . T.drop 1 . T.dropWhile (/= '=') . T.decodeUtf8+ <$> B.packCStringLen (commentPtr, commentSize) foreign import ccall unsafe "FLAC__metadata_get_vorbis_comment" c_get_vorbis_comment :: Metadata -> CString -> Ptr Word32 -> IO CString
Codec/Audio/FLAC/Metadata/Internal/Object.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Metadata.Internal.Object--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/Metadata/Internal/Types.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Metadata.Internal.Types--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/StreamDecoder.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamDecoder--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -30,6 +30,7 @@ module Codec.Audio.FLAC.StreamDecoder ( DecoderSettings (..)+ , defaultDecoderSettings , DecoderException (..) , DecoderInitStatus (..) , DecoderState (..)@@ -46,7 +47,6 @@ import Control.Monad import Control.Monad.IO.Class (MonadIO (..)) import Data.Bool (bool)-import Data.Default.Class import Data.Function import Data.IORef import Foreign@@ -67,11 +67,16 @@ -- 'WaveVanilla'. } deriving (Show, Read, Eq, Ord) -instance Default DecoderSettings where- def = DecoderSettings- { decoderMd5Checking = False- , decoderWaveFormat = WaveVanilla }+-- | Default 'DecoderSettings'.+--+-- @since 0.2.0 +defaultDecoderSettings :: DecoderSettings+defaultDecoderSettings = DecoderSettings+ { decoderMd5Checking = False+ , decoderWaveFormat = WaveVanilla+ }+ -- | Decode a FLAC file to WAVE. -- -- 'DecoderException' is thrown when underlying FLAC decoder reports a@@ -86,7 +91,7 @@ ipath <- makeAbsolute ipath' opath <- makeAbsolute opath' liftInit (decoderSetMd5Checking d decoderMd5Checking)- (maxBlockSize, wave) <- runFlacMeta def ipath $ do+ (maxBlockSize, wave) <- runFlacMeta defaultMetaSettings ipath $ do let waveFileFormat = decoderWaveFormat waveDataOffset = 0 waveDataSize = 0
Codec/Audio/FLAC/StreamDecoder/Internal.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamDecoder.Internal--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -10,6 +10,7 @@ -- Low-level Haskell wrapper around FLAC stream decoder API. {-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE LambdaCase #-} module Codec.Audio.FLAC.StreamDecoder.Internal ( withDecoder@@ -34,11 +35,10 @@ -- 'DecoderException' is raised. withDecoder :: (Decoder -> IO a) -> IO a-withDecoder f = bracket decoderNew (mapM_ decoderDelete) $ \mdecoder ->- case mdecoder of- Nothing -> throwM- (DecoderFailed DecoderStateMemoryAllocationError)- Just x -> f x+withDecoder f = bracket decoderNew (mapM_ decoderDelete) $ \case+ Nothing -> throwM+ (DecoderFailed DecoderStateMemoryAllocationError)+ Just x -> f x -- | Create a new stream decoder instance with the default settings. In the -- case of memory allocation problem 'Nothing' is returned.
Codec/Audio/FLAC/StreamDecoder/Internal/Helpers.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamDecoder.Internal.Helpers--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -8,6 +8,8 @@ -- Portability : portable -- -- Wrappers around helpers written to help work with the stream decoder.++{-# LANGUAGE ForeignFunctionInterface #-} module Codec.Audio.FLAC.StreamDecoder.Internal.Helpers ( decoderInitHelper )
Codec/Audio/FLAC/StreamDecoder/Internal/Types.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamDecoder.Internal.Types--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/StreamEncoder.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamEncoder--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -30,6 +30,7 @@ module Codec.Audio.FLAC.StreamEncoder ( EncoderSettings (..)+ , defaultEncoderSettings , EncoderException (..) , EncoderInitStatus (..) , EncoderState (..)@@ -45,7 +46,6 @@ import Control.Monad import Control.Monad.IO.Class (MonadIO (..)) import Data.Bool (bool)-import Data.Default.Class import Data.List.NonEmpty (NonEmpty (..)) import Data.Word import System.Directory@@ -109,19 +109,24 @@ -- use the best. Default: 'Nothing'. } deriving (Show, Read, Eq, Ord) -instance Default EncoderSettings where- def = EncoderSettings- { encoderCompression = 5- , encoderBlockSize = 0- , encoderVerify = False- , encoderDoMidSideStereo = Nothing- , encoderLooseMidSideStereo = Nothing- , encoderApodization = Nothing- , encoderMaxLpcOrder = Nothing- , encoderQlpCoeffPrecision = Nothing- , encoderDoQlpCoeffPrecisionSearch = Nothing- , encoderDoExhaustiveModelSearch = Nothing- , encoderResidualPartitionOrders = Nothing }+-- | Default 'EncoderSettings'.+--+-- @since 0.2.0++defaultEncoderSettings :: EncoderSettings+defaultEncoderSettings = EncoderSettings+ { encoderCompression = 5+ , encoderBlockSize = 0+ , encoderVerify = False+ , encoderDoMidSideStereo = Nothing+ , encoderLooseMidSideStereo = Nothing+ , encoderApodization = Nothing+ , encoderMaxLpcOrder = Nothing+ , encoderQlpCoeffPrecision = Nothing+ , encoderDoQlpCoeffPrecisionSearch = Nothing+ , encoderDoExhaustiveModelSearch = Nothing+ , encoderResidualPartitionOrders = Nothing+ } -- | Encode a WAVE file or RF64 file to native FLAC. --
Codec/Audio/FLAC/StreamEncoder/Apodization.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamEncoder.Apodization--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/StreamEncoder/Internal.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamEncoder.Internal--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -12,6 +12,7 @@ -- <https://xiph.org/flac/api/group__flac__stream__encoder.html> {-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE LambdaCase #-} module Codec.Audio.FLAC.StreamEncoder.Internal ( withEncoder@@ -53,11 +54,10 @@ -- 'EncoderException' is raised. withEncoder :: (Encoder -> IO a) -> IO a-withEncoder f = bracket encoderNew (mapM_ encoderDelete) $ \mencoder ->- case mencoder of- Nothing -> throwM- (EncoderFailed EncoderStateMemoryAllocationError)- Just x -> f x+withEncoder f = bracket encoderNew (mapM_ encoderDelete) $ \case+ Nothing -> throwM+ (EncoderFailed EncoderStateMemoryAllocationError)+ Just x -> f x -- | Create a new stream encoder instance with the default settings. In the -- case of memory allocation problem 'Nothing' is returned.
Codec/Audio/FLAC/StreamEncoder/Internal/Helpers.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamEncoder.Internal.Helpers--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/StreamEncoder/Internal/Types.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.StreamEncoder.Internal.Types--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
Codec/Audio/FLAC/Util.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.FLAC.Util--- Copyright : © 2016–2017 Mark Karpov+-- Copyright : © 2016–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
LICENSE.md view
@@ -1,4 +1,4 @@-Copyright © 2016–2017 Mark Karpov+Copyright © 2016–2018 Mark Karpov All rights reserved.
README.md view
@@ -5,7 +5,6 @@ [](http://stackage.org/nightly/package/flac) [](http://stackage.org/lts/package/flac) [](https://travis-ci.org/mrkkrp/flac)-[](https://coveralls.io/github/mrkkrp/flac?branch=master) * [Aims of the project](#aims-of-the-project) * [Motivation](#motivation)@@ -116,6 +115,6 @@ ## License -Copyright © 2016–2017 Mark Karpov+Copyright © 2016–2019 Mark Karpov Distributed under BSD 3 clause license.
flac.cabal view
@@ -1,7 +1,7 @@ name: flac-version: 0.1.2-cabal-version: >= 1.10-tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.1+version: 0.2.0+cabal-version: 1.18+tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.3 license: BSD3 license-file: LICENSE.md author: Mark Karpov <markkarpov92@gmail.com>@@ -31,10 +31,9 @@ library build-depends: base >= 4.8 && < 5.0 , bytestring >= 0.2 && < 0.11- , containers >= 0.5 && < 0.6- , data-default-class+ , containers >= 0.5 && < 0.7 , directory >= 1.2.2 && < 1.4- , exceptions >= 0.6 && < 0.9+ , exceptions >= 0.6 && < 0.11 , filepath >= 1.2 && < 1.5 , mtl >= 2.0 && < 3.0 , text >= 0.2 && < 1.3@@ -68,6 +67,12 @@ ghc-options: -Wall -Werror -fsimpl-tick-factor=150 else ghc-options: -O2 -Wall -fsimpl-tick-factor=150+ if flag(dev) && impl(ghc >= 8.0)+ ghc-options: -Wcompat+ -Wincomplete-record-updates+ -Wincomplete-uni-patterns+ -Wnoncanonical-monad-instances+ -Wnoncanonical-monadfail-instances default-language: Haskell2010 test-suite tests@@ -78,15 +83,15 @@ type: exitcode-stdio-1.0 build-depends: base >= 4.8 && < 5.0 , bytestring >= 0.2 && < 0.11- , data-default-class , directory >= 1.2.2 && < 1.4 , filepath >= 1.2 && < 1.5 , flac , hspec >= 2.0 && < 3.0- , temporary >= 1.1 && < 1.3+ , temporary >= 1.1 && < 1.4 , transformers >= 0.4 && < 0.6 , vector >= 0.10 && < 0.13 , wave >= 0.1.2 && < 0.2+ build-tools: hspec-discover >= 2.0 && < 3.0 if !impl(ghc >= 8.0) build-depends: semigroups == 0.18.* if flag(dev)
tests/Codec/Audio/FLAC/MetadataSpec.hs view
@@ -10,7 +10,6 @@ import Control.Monad import Control.Monad.IO.Class (MonadIO (..)) import Data.ByteString (ByteString)-import Data.Default.Class import Data.List.NonEmpty (NonEmpty (..)) import Data.Vector (Vector) import System.Directory@@ -356,6 +355,11 @@ ---------------------------------------------------------------------------- -- Helpers++-- | A shortcut for 'defaultMetaSettings'.++def :: MetaSettings+def = defaultMetaSettings infix 1 `shouldBe`, `shouldReturn`
tests/Codec/Audio/FLAC/StreamEncoderSpec.hs view
@@ -9,7 +9,6 @@ import Codec.Audio.Wave import Control.Monad import Data.ByteString (ByteString)-import Data.Default.Class import System.Directory import System.FilePath import System.IO@@ -32,9 +31,11 @@ old <- Blind <$> fetchWaveBody path -- We first let the built-in verification mechanics catch possible -- errors.- encodeFlac def { encoderVerify = True } path path+ encodeFlac defaultEncoderSettings+ { encoderVerify = True } path path -- Then we let decoder check that the streams match with MD5 hash.- decodeFlac def { decoderMd5Checking = True } path path+ decodeFlac defaultDecoderSettings+ { decoderMd5Checking = True } path path -- But we also want to be sure that audio streams match -- byte-by-byte, we can't trust just FLAC's own checking. new <- Blind <$> fetchWaveBody path