packages feed

sndfile-enumerators 0.4.0 → 0.5.0

raw patch · 4 files changed

+13/−9 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

examples/wave_reader.hs view
@@ -24,7 +24,7 @@     [] -> putStrLn "Usage: wave_reader FileName"     fname:xs -> do       putStrLn $ "Reading file: " ++ fname-      fileDriverRandom (2^14) (waveReader >>= test) fname+      fileDriverRandom 8192 (waveReader >>= test) fname       return ()  -- Use the collection of [WAVEDE] returned from waveReader to
examples/wave_writer.hs view
@@ -19,12 +19,16 @@     fname:oname:xs -> do       putStrLn $ "Reading file: " ++ fname       fileDriverAudio (waveReader >>= writer oname) fname+      --runAudioMonad $ run $ writer2 oname       return ()     _ -> putStrLn "Usage: wave_writer ReadFile WriteFile"  -- Use the collection of [WAVEDE] returned from waveReader to--- do further processing.  In this case, write out a new file with the--- same format.+-- do further processing.  The IntMap has an entry for each type of chunk+-- in the wave file.  Read the first format chunk and disply the +-- format information, then use the dictProcessData function+-- to enumerate over the max_iter iteratee to find the maximum value+-- (peak amplitude) in the file. writer :: FilePath -> Maybe (IM.IntMap [WAVEDE]) -> MIteratee (IB.IOBuffer r Word8) AudioMonad () writer _ Nothing = liftIO $ putStrLn "No dictionary" writer fp (Just dict) = do
sndfile-enumerators.cabal view
@@ -1,5 +1,5 @@ Name:		sndfile-enumerators-Version:        0.4.0+Version:        0.5.0 Cabal-Version:  >= 1.2 Description:	encode and decode soundfiles using Iteratees.                 Audio files may be read or written, with classes and @@ -15,7 +15,7 @@ category:       Codec, Sound build-type:     Simple cabal-version:  >= 1.2-tested-with:    GHC == 6.10.4, GHC == 6.12.1+tested-with:    GHC == 6.12.3 extra-source-files:   LICENSE   examples/wave_reader.hs
src/Sound/Iteratee/Codecs/Wave.hs view
@@ -209,12 +209,12 @@   fmt_m <- dictReadLastFormat dict   case fmt_m of     Just fmt ->-      fmt `seq` (return . Just $ WENDUB (\iter_dub -> do+      fmt `seq` (return . Just . WENDUB $ \iter_dub -> do         MIteratee $ Itr.seek (8 + fromIntegral offset)         offp <- liftIO $ newFp 0         bufp <- liftIO $ mallocForeignPtrArray defaultChunkLength         let iter = convStream (convFunc fmt offp bufp) iter_dub-        joinIob . takeUpTo count $ iter)+        joinIob . takeUpTo count $ iter       )     Nothing ->       MIteratee . throwErr . iterStrExc $@@ -222,13 +222,13 @@  -- return the WaveFormat iteratee readValue _dict offset WAVEFMT count =-  return . Just $ WENBYTE $ \iter -> do+  return . Just . WENBYTE $ \iter -> do     MIteratee $ Itr.seek (8 + fromIntegral offset)     joinIob $ MI.takeUpTo count iter  -- for WAVEOTHER, return Word8s and maybe the user can parse them readValue _dict offset (WAVEOTHER _str) count =-  return . Just $ WENBYTE $ \iter -> do+  return . Just . WENBYTE $ \iter -> do     MIteratee $ Itr.seek (8 + fromIntegral offset)     joinIob $ MI.takeUpTo count iter