sox-0.2.2.7: Play, write, read, convert audio signals using Sox

Safe HaskellSafe
LanguageHaskell98

Sound.Sox.Read

Synopsis

Documentation

data Handle signal Source #

open :: C y => T -> FilePath -> IO (Handle (sig y)) Source #

Unfortunately we cannot retrieve the sample rate using sox. However there is soxi for this purpose, which we may support in future.

:load Sound.Sox.Read Sound.Sox.Signal.List
:module + Control.Exception
bracket (open Option.none "test.aiff") close $ \h -> withHandle2 Sound.Sox.Signal.List.getContents h >>= \x -> print (Control.Monad.Exception.Asynchronous.result x :: [Data.Int.Int16])

withHandle1 :: (Handle -> m signal) -> Handle signal -> m signal Source #

withHandle2 :: (Handle -> m (f signal)) -> Handle signal -> m (f signal) Source #