|
|
|
|
|
|
Synopsis |
|
writeDataFile :: Storable a => FilePath -> [a] -> IO () | | readDataFile :: Storable a => FilePath -> IO [a] | | openDataFile :: Storable a => FilePath -> [a] | | writeWavFile :: FilePath -> Either [Int16] [(Int16, Int16)] -> IO () | | writeWavFileMono :: FilePath -> [Int16] -> IO () | | writeWavFileStereo :: FilePath -> [(Int16, Int16)] -> IO () | | readWavFile :: FilePath -> IO (Either [Int16] [(Int16, Int16)]) | | openWavFile :: FilePath -> Either [Int16] [(Int16, Int16)] | | writeWavFiles :: FilePath -> String -> [Either [Int16] [(Int16, Int16)]] -> IO () | | wavInt16ToDouble :: Int16 -> Double | | wavDoubleToInt16 :: Double -> Int16 | | readArrayFromFile :: Storable a => HeaderSize -> FilePath -> IO (StorableArray Int a, Int) | | writeArrayToFileWithHeader :: (MArray StorableArray a IO, Storable a) => HeaderFun -> FilePath -> StorableArray Int a -> IO () | | writeArrayToFile :: (MArray StorableArray a IO, Storable a) => FilePath -> StorableArray Int a -> IO () | | openSingleInputFile :: Storable a => Int -> HeaderSize -> FilePath -> IO (IO (), IO (Maybe a), Int) | | openSingleOutputFile :: Storable a => Int -> FilePath -> IO (IO (), a -> IO ()) | | openSingleInputWavFile :: Int -> FilePath -> IO (IO (), Either (IO (Maybe Int16)) (IO (Maybe (Int16, Int16))), Int) | | openSingleOutputWavFileMono :: Int -> FilePath -> IO (IO (), Int16 -> IO ()) | | openSingleOutputWavFileStereo :: Int -> FilePath -> IO (IO (), (Int16, Int16) -> IO ()) | | openInputFile :: Storable a => HeaderSize -> FilePath -> Int -> IO (IO (), StorableArray Int a -> Int -> IO Int, Int) | | openOutputFile :: Storable a => FilePath -> IO (IO (), StorableArray Int a -> Int -> IO ()) | | openOutputFileWithHeader :: Storable a => HeaderFun -> FilePath -> IO (IO (), StorableArray Int a -> Int -> IO ()) | | openInputWavFile :: FilePath -> IO (IO (), StorableArray Int Int16 -> Int -> IO (), Int, Bool) | | openOutputWavFileMono :: FilePath -> IO (IO (), StorableArray Int Int16 -> Int -> IO ()) | | openOutputWavFileStereo :: FilePath -> IO (IO (), StorableArray Int Int16 -> Int -> IO ()) | | type HeaderFun = (Handle -> IO (), Handle -> Int -> IO ()) | | type HeaderSize = Int | | noHeader :: HeaderFun | | wavHeaderFunMono :: HeaderFun | | wavHeaderFunStereo :: HeaderFun | | wavHeaderSize :: HeaderSize | | initWriteWavHeaderMono :: Handle -> IO () | | initWriteWavHeaderStereo :: Handle -> IO () | | initReadWavHeader :: Handle -> IO (Maybe (Bool, Int, Int, Int)) | | closeWriteWavHeader :: Handle -> Int -> IO () | | encode :: Int -> String | | decode :: String -> Int | | encodeWavLengt :: Int -> (String, String) | | initWavHeaderMono :: [Char] | | initWavHeaderStereo :: [Char] | | sizeOfArrayElements :: Storable a => StorableArray Int a -> Int | | inferSizeOfArrayElements :: Storable a => (StorableArray Int a -> IO Int) -> StorableArray Int a -> Int | | inferSizeOfArrayElements' :: Storable a => (StorableArray Int a -> Int -> IO ()) -> StorableArray Int a -> Int |
|
|
|
Binary Files
|
|
|
|
|
|
|
|
WAV-Files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cast between Int16 and Double representation of WAV-data
|
|
|
|
|
|
Low-Level implemetation
|
|
Arrays and Files
|
|
|
|
|
|
|
|
Single Stream
|
|
|
|
|
|
|
|
|
|
|
|
Buffered Stream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Header Stuff and others
|
|
|
The first Action is applied after opening the file. Then the data
bytes are written. The second Action is then called with the number of
bytes of the data. It must close the handle.
|
|
|
|
|
|
|
The first Action writes the Header of the wav-file.
Then the wav-data is written. The second action moves
the Handle to the positions where the lenght of the wav-file
are encoded (in the header) and writes the right number, which
is unknown before all data is written.
Afterwards it closes the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |