Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Documentation
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 #