sox-0.2: Play, write, read, convert audio signals using SoxSource codeContentsIndex
Sound.Sox.Read
Synopsis
data Handle signal
open :: C y => T -> FilePath -> IO (Handle (sig y))
close :: Handle signal -> IO ExitCode
withHandle1 :: (Handle -> m signal) -> Handle signal -> m signal
withHandle2 :: (Handle -> m (f signal)) -> Handle signal -> m (f signal)
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

 open Option.none "test.aiff" >>= withHandle2 Sound.Sox.Signal.List.getContents >>= (\x -> print (Control.Monad.Exception.Asynchronous.result x :: [Data.Int.Int16]))
close :: Handle signal -> IO ExitCodeSource
withHandle1 :: (Handle -> m signal) -> Handle signal -> m signalSource
withHandle2 :: (Handle -> m (f signal)) -> Handle signal -> m (f signal)Source
Produced by Haddock version 2.7.2