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

Safe HaskellNone

Sound.SoxLib

Synopsis

Documentation

with :: IO a -> IO aSource

Deprecated: I found no documentation for it and thus think that it is deprecated. Use formatWith instead.

formatWith :: IO a -> IO aSource

All SoxLib operations must be enclosed in formatWith. You must only call it once per program.

openRead :: ReaderInfo -> FilePath -> IO (FormatPtr ReadMode)Source

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

withRead :: ReaderInfo -> FilePath -> (FormatPtr ReadMode -> IO a) -> IO aSource

readStorableVector :: FormatPtr ReadMode -> Int -> IO (Vector Int32)Source

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

readStorableVectorLazy :: FormatPtr ReadMode -> ChunkSize -> IO (Vector Int32)Source

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

openWrite :: WriterInfo -> FilePath -> IO (FormatPtr WriteMode)Source

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

withWrite :: WriterInfo -> FilePath -> (FormatPtr WriteMode -> IO a) -> IO aSource

writeStorableVector :: FormatPtr WriteMode -> Vector Int32 -> IO ()Source

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

writeStorableVectorLazy :: FormatPtr WriteMode -> Vector Int32 -> IO ()Source

The chunkSize must be divisible by the number of channels.

close :: Mode mode => FormatPtr mode -> IO ()Source

seek :: Mode mode => FormatPtr mode -> Int -> IO ()Source

class Mode mode whereSource

Methods

getModeChar :: Format mode -> CCharSource

data ReadMode Source

Instances

newtype FileType Source

Constructors

FileType 

Fields

unFileType :: String
 

Instances