soxlib-0.0.1.1: Write, read, convert audio signals using libsox

Safe HaskellNone

Sound.SoxLib

Synopsis

Documentation

with :: IO a -> IO a

formatWith :: IO a -> IO a

openRead :: ReaderInfo -> FilePath -> IO (Ptr (Format ReadMode))

This function will never return a nullPtr. Instead it throws a user exception if the file cannot be opened.

readStorableVector :: Ptr (Format ReadMode) -> Int -> IO (Vector Int32)

Multi-channel data is interleaved. size must be divisible by the number of channels.

readStorableVectorLazy :: Ptr (Format ReadMode) -> ChunkSize -> IO (Vector Int32)

Read complete file lazily into chunky storable vector. The chunkSize must be divisible by the number of channels.

openWrite :: WriterInfo -> FilePath -> IO (Ptr (Format WriteMode))

This function will never return a nullPtr. Instead it throws a user exception if the file cannot be opened.

writeStorableVector :: Ptr (Format WriteMode) -> Vector Int32 -> IO ()

Multi-channel data is interleaved. size must be divisible by the number of channels.

writeStorableVectorLazy :: Ptr (Format WriteMode) -> Vector Int32 -> IO ()

The chunkSize must be divisible by the number of channels.

close :: Mode mode => Ptr (Format mode) -> IO ()

seek :: Mode mode => Ptr (Format mode) -> Int -> IO ()

class Mode mode where

Methods

getModeChar :: Format mode -> CChar

data ReadMode

Instances

data WriteMode

Instances

type Rate = Double

newtype FileType

Constructors

FileType 

Fields

unFileType :: String
 

data Format mode

Instances

Mode mode => Storable (Format mode) 

data EncodingInfo

Constructors

EncodingInfo 

Fields

encoding :: Encoding
 
bitsPerSample :: Int
 
compression :: Double
 
reverseBytes :: Option
 
reverseNibbles :: Option
 
reverseBits :: Option
 
oppositeEndian :: Bool