wave 0.1.2 → 0.1.3
raw patch · 3 files changed
+26/−4 lines, 3 filesdep ~wave
Dependency ranges changed: wave
Files
- CHANGELOG.md +5/−0
- Codec/Audio/Wave.hs +19/−2
- wave.cabal +2/−2
CHANGELOG.md view
@@ -1,3 +1,8 @@+## Wave 0.1.3++* Adjust and document guessing of channel mask from number of channels alone+ for files with non-extensible `fmt` chunks.+ ## Wave 0.1.2 * Switched to using `withBinaryFile` instead of `withFile`, because the
Codec/Audio/Wave.hs view
@@ -372,6 +372,19 @@ -- 'SampleFormat'. Addition of other formats will be performed on request, -- please feel free to contact me at -- <https://github.com/mrkkrp/wave/issues>.+--+-- Finally, if “fmt” chunk is not extensible, we try to guess channel mask+-- from number of channels alone, here is how:+--+-- * 1 channel: front center (C)+-- * 2 channels: front left (L), front right (R)+-- * 3 channels: L, R, C+-- * 4 channels: L, R, back left (Lb), back right (Rb)+-- * 5 channels: L, R, C, Lb, Rb+-- * 6 channels: L, R, C, LFE, Lb, Rb+-- * 7 channels: L, R, C, LFE, back center (Cb), side left (Ls), side right (Rs)+-- * 8 channels: L, R, C, LFE, Lb, Rb, Ls, Rs+-- * N channels: first N items are taken from @[minBound..maxBound]@ of 'SpeakerPosition's readWaveFile :: MonadIO m => FilePath -- ^ Location of file to read@@ -813,8 +826,12 @@ 0 -> E.empty 1 -> speakerMono 2 -> speakerStereo- 3 -> E.fromList [SpeakerFrontLeft,SpeakerFrontCenter,SpeakerFrontRight]- 4 -> speakerSurround+ 3 -> E.fromList [SpeakerFrontLeft,SpeakerFrontRight,SpeakerFrontCenter]+ 4 -> speakerQuad+ 5 -> E.insert SpeakerFrontCenter speakerQuad+ 6 -> speaker5_1+ 7 -> E.insert SpeakerBackCenter speaker5_1Surround+ 8 -> speaker7_1Surround x -> E.fromList $ take (fromIntegral x) [minBound..maxBound] -- | Does this 'Wave' record requires extensible format chunk to be used?
wave.cabal view
@@ -31,7 +31,7 @@ -- POSSIBILITY OF SUCH DAMAGE. name: wave-version: 0.1.2+version: 0.1.3 cabal-version: >= 1.10 license: BSD3 license-file: LICENSE.md@@ -83,7 +83,7 @@ , data-default-class , hspec >= 2.0 && < 3.0 , temporary >= 1.1 && < 1.3- , wave >= 0.1.2+ , wave >= 0.1.3 if flag(dev) ghc-options: -Wall -Werror else