lame 0.1.1 → 0.2.0
raw patch · 7 files changed
+56/−43 lines, 7 filesdep −data-default-classdep ~bytestringdep ~textdep ~wave
Dependencies removed: data-default-class
Dependency ranges changed: bytestring, text, wave
Files
- CHANGELOG.md +5/−0
- Codec/Audio/LAME.hs +31/−26
- Codec/Audio/LAME/Internal.hs +1/−1
- LICENSE.md +1/−1
- README.md +3/−4
- lame.cabal +14/−9
- tests/Codec/Audio/LAMESpec.hs +1/−2
CHANGELOG.md view
@@ -1,3 +1,8 @@+## LAME 0.2.0++* Got rid of `data-default-class`. Instead of making `EncoderSettings` an+ instance of `Default` we export `defaultEncoderSettings`.+ ## LAME 0.1.1 * Improved documentation and metadata.
Codec/Audio/LAME.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.LAME--- Copyright : © 2017 Mark Karpov+-- Copyright : © 2017–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>@@ -16,6 +16,7 @@ module Codec.Audio.LAME ( encodeMp3 , EncoderSettings (..)+ , defaultEncoderSettings , Compression (..) , VbrMode (..) , MetadataPlacement (..)@@ -28,7 +29,6 @@ import Control.Monad.Catch import Control.Monad.IO.Class import Data.ByteString (ByteString)-import Data.Default.Class import Data.Maybe (fromMaybe) import Data.Text (Text) import Data.Word@@ -108,30 +108,35 @@ -- ^ Settings for high-pass filter. Default value: 'FilterAuto'. } deriving (Show, Read, Eq, Ord) -instance Default EncoderSettings where- def = EncoderSettings- { encoderScale = 1- , encoderSampleRate = Nothing- , encoderFreeFormat = False- , encoderNoGap = Nothing- , encoderCopyright = False- , encoderOriginal = True- , encoderErrorProtection = False- , encoderStrictISO = False- , encoderWriteVbrTag = True- , encoderQuality = Nothing- , encoderCompression = CompressionRatio 11- , encoderMetadataPlacement = Id3v2Only- , encoderTagTitle = Nothing- , encoderTagArtist = Nothing- , encoderTagAlbum = Nothing- , encoderTagYear = Nothing- , encoderTagComment = Nothing- , encoderTagTrack = Nothing- , encoderTagGenre = Nothing- , encoderAlbumArt = Nothing- , encoderLowpassFilter = FilterAuto- , encoderHighpassFilter = FilterAuto }+-- | Default value of 'EncoderSettings'.+--+-- @since 0.2.0++defaultEncoderSettings :: EncoderSettings+defaultEncoderSettings = EncoderSettings+ { encoderScale = 1+ , encoderSampleRate = Nothing+ , encoderFreeFormat = False+ , encoderNoGap = Nothing+ , encoderCopyright = False+ , encoderOriginal = True+ , encoderErrorProtection = False+ , encoderStrictISO = False+ , encoderWriteVbrTag = True+ , encoderQuality = Nothing+ , encoderCompression = CompressionRatio 11+ , encoderMetadataPlacement = Id3v2Only+ , encoderTagTitle = Nothing+ , encoderTagArtist = Nothing+ , encoderTagAlbum = Nothing+ , encoderTagYear = Nothing+ , encoderTagComment = Nothing+ , encoderTagTrack = Nothing+ , encoderTagGenre = Nothing+ , encoderAlbumArt = Nothing+ , encoderLowpassFilter = FilterAuto+ , encoderHighpassFilter = FilterAuto+ } -- | The data type represents supported options for compression. You can -- specify either fixed bitrate, compression ratio, or use the VBR mode.
Codec/Audio/LAME/Internal.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Codec.Audio.LAME.Internal--- Copyright : © 2017 Mark Karpov+-- Copyright : © 2017–2019 Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <markkarpov92@gmail.com>
LICENSE.md view
@@ -1,4 +1,4 @@-Copyright © 2017 Mark Karpov+Copyright © 2017–2018 Mark Karpov All rights reserved.
README.md view
@@ -5,10 +5,9 @@ [](http://stackage.org/nightly/package/lame) [](http://stackage.org/lts/package/lame) [](https://travis-ci.org/mrkkrp/lame)-[](https://coveralls.io/github/mrkkrp/lame?branch=master) -This is a fairly complete high-level Haskell binding-to [LAME](http://lame.sourceforge.net/).+This is a fairly complete high-level Haskell binding to+[LAME](http://lame.sourceforge.net/). ## Provided functionality @@ -38,6 +37,6 @@ ## License -Copyright © 2017 Mark Karpov+Copyright © 2017–2019 Mark Karpov Distributed under BSD 3 clause license.
lame.cabal view
@@ -1,7 +1,7 @@ name: lame-version: 0.1.1-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>@@ -29,13 +29,12 @@ library build-depends: base >= 4.8 && < 5.0 , bytestring >= 0.2 && < 0.11- , data-default-class , directory >= 1.2.2 && < 1.4- , exceptions >= 0.6 && < 0.9+ , exceptions >= 0.6 && < 0.11 , filepath >= 1.2 && < 1.5 , text >= 0.2 && < 1.3 , transformers >= 0.4 && < 0.6- , wave >= 0.1.2 && < 0.2+ , wave >= 0.1.2 && < 0.3 extra-libraries: mp3lame exposed-modules: Codec.Audio.LAME other-modules: Codec.Audio.LAME.Internal@@ -45,6 +44,12 @@ ghc-options: -Wall -Werror else ghc-options: -O2 -Wall+ 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@@ -52,14 +57,14 @@ hs-source-dirs: tests type: exitcode-stdio-1.0 build-depends: base >= 4.8 && < 5.0- , data-default-class , directory >= 1.2.2 && < 1.4 , filepath >= 1.2 && < 1.5 , hspec >= 2.0 && < 3.0- , htaglib >= 1.0 && < 1.2+ , htaglib >= 1.0 && < 1.3 , lame- , temporary >= 1.1 && < 1.3+ , temporary >= 1.1 && < 1.4 , text >= 0.2 && < 1.3+ build-tools: hspec-discover >= 2.0 && < 3.0 other-modules: Codec.Audio.LAMESpec if flag(dev) ghc-options: -Wall -Werror
tests/Codec/Audio/LAMESpec.hs view
@@ -7,7 +7,6 @@ import Codec.Audio.LAME import Control.Monad-import Data.Default.Class import Data.Text (Text) import Data.Word (Word8) import Sound.HTagLib@@ -36,7 +35,7 @@ describe "encodeMp3" $ withVariousWaves $ it "produces correct MP3 file" $ \(ipath, opath) -> do- encodeMp3 def+ encodeMp3 defaultEncoderSettings { encoderTagTitle = pure tagTitle , encoderTagArtist = pure tagArtist , encoderTagAlbum = pure tagAlbum