Safe Haskell | None |
---|
- with :: IO a -> IO a
- formatWith :: IO a -> IO a
- openRead :: ReaderInfo -> FilePath -> IO (FormatPtr ReadMode)
- withRead :: ReaderInfo -> FilePath -> (FormatPtr ReadMode -> IO a) -> IO a
- readStorableVector :: FormatPtr ReadMode -> Int -> IO (Vector Int32)
- readStorableVectorLazy :: FormatPtr ReadMode -> ChunkSize -> IO (Vector Int32)
- openWrite :: WriterInfo -> FilePath -> IO (FormatPtr WriteMode)
- withWrite :: WriterInfo -> FilePath -> (FormatPtr WriteMode -> IO a) -> IO a
- writeStorableVector :: FormatPtr WriteMode -> Vector Int32 -> IO ()
- writeStorableVectorLazy :: FormatPtr WriteMode -> Vector Int32 -> IO ()
- storableVectorLazyFromByteString :: ReaderInfo -> ByteString -> ChunkSize -> Maybe (Vector Int32)
- close :: Mode mode => FormatPtr mode -> IO ()
- seek :: Mode mode => FormatPtr mode -> Int -> IO ()
- class Mode mode where
- getModeChar :: Format mode -> CChar
- data ReadMode
- data WriteMode
- data ReaderInfo = ReaderInfo {}
- defaultReaderInfo :: ReaderInfo
- data WriterInfo = WriterInfo {}
- defaultWriterInfo :: WriterInfo
- type Rate = Double
- newtype FileType = FileType {
- unFileType :: String
- data Format mode = Format {}
- data SignalInfo = SignalInfo {}
- data EncodingInfo = EncodingInfo {}
- defaultSignalInfo :: SignalInfo
- data IOType
- ioFile :: IOType
- ioPipe :: IOType
- ioURL :: IOType
- data Option
- optionNo :: Option
- optionYes :: Option
- optionDefault :: Option
- data Encoding
- encodingUnknown :: Encoding
- encodingSign2 :: Encoding
- encodingUnsigned :: Encoding
- encodingFloat :: Encoding
- encodingFloatText :: Encoding
- encodingFlac :: Encoding
- encodingHcom :: Encoding
- encodingWavpack :: Encoding
- encodingWavpackf :: Encoding
- encodingUlaw :: Encoding
- encodingAlaw :: Encoding
- encodingG721 :: Encoding
- encodingG723 :: Encoding
- encodingClADPCM :: Encoding
- encodingClADPCM16 :: Encoding
- encodingMsADPCM :: Encoding
- encodingImaADPCM :: Encoding
- encodingOkiADPCM :: Encoding
- encodingDPCM :: Encoding
- encodingDWVW :: Encoding
- encodingDWVWN :: Encoding
- encodingGSM :: Encoding
- encodingMP3 :: Encoding
- encodingVorbis :: Encoding
- encodingAmrWB :: Encoding
- encodingAmrNB :: Encoding
- encodingCVSD :: Encoding
- encodingLPC10 :: Encoding
Documentation
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.
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.
writeStorableVector :: FormatPtr WriteMode -> Vector Int32 -> IO ()Source
Multi-channel data is interleaved.
size
must be divisible by the number of channels.
Caution: Writing large chunks (e.g. more than 8192 samples) may crash the FLAC backend.
writeStorableVectorLazy :: FormatPtr WriteMode -> Vector Int32 -> IO ()Source
The chunkSize must be divisible by the number of channels.
storableVectorLazyFromByteString :: ReaderInfo -> ByteString -> ChunkSize -> Maybe (Vector Int32)Source
It reads lazily to lazy storable vector.
That is, the whole ByteString
is kept as long as we process the lazy storable vector.
data ReaderInfo Source
data WriterInfo Source
data EncodingInfo Source
EncodingInfo | |
|