iteratee-0.2.4: Iteratee-based I/OSource codeContentsIndex
Data.Iteratee.Codecs.Wave
Synopsis
data WAVEDE = WAVEDE {
wavede_count :: Int
wavede_type :: WAVE_CHUNK
wavede_enum :: WAVEDE_ENUM
}
data WAVEDE_ENUM
= WEN_BYTE (forall a. EnumeratorGMM L Word8 L Word8 IO a)
| WEN_DUB (forall a. EnumeratorGMM L Word8 L Double IO a)
data WAVE_CHUNK
= WAVE_FMT
| WAVE_DATA
| WAVE_OTHER String
data AudioFormat = AudioFormat {
numberOfChannels :: NumChannels
sampleRate :: SampleRate
bitDepth :: BitDepth
}
waveReader :: IterateeG L Word8 IO (Maybe WAVEDict)
readRiff :: IterateeG L Word8 IO ()
waveChunk :: String -> Maybe WAVE_CHUNK
chunkToString :: WAVE_CHUNK -> String
dictReadFormat :: Int -> WAVEDict -> IterateeG L Word8 IO (Maybe AudioFormat)
dictReadFirstFormat :: WAVEDict -> IterateeG L Word8 IO (Maybe AudioFormat)
dictReadLastFormat :: WAVEDict -> IterateeG L Word8 IO (Maybe AudioFormat)
dictReadFirstData :: WAVEDict -> IterateeG L Word8 IO (Maybe [Double])
dictReadLastData :: WAVEDict -> IterateeG L Word8 IO (Maybe [Double])
dictReadData :: Int -> WAVEDict -> IterateeG L Word8 IO (Maybe [Double])
dictProcessData :: Int -> WAVEDict -> IterateeG L Double IO a -> IterateeG L Word8 IO (Maybe a)
Documentation
data WAVEDE Source
Constructors
WAVEDE
wavede_count :: Intlength of chunk
wavede_type :: WAVE_CHUNKtype of chunk
wavede_enum :: WAVEDE_ENUMenumerator to get values of chunk
data WAVEDE_ENUM Source
Constructors
WEN_BYTE (forall a. EnumeratorGMM L Word8 L Word8 IO a)
WEN_DUB (forall a. EnumeratorGMM L Word8 L Double IO a)
data WAVE_CHUNK Source
Standard WAVE Chunks
Constructors
WAVE_FMTFormat
WAVE_DATAData
WAVE_OTHER StringOther
show/hide Instances
data AudioFormat Source
Constructors
AudioFormat
numberOfChannels :: NumChannelsNumber of channels in the audio data
sampleRate :: SampleRateSample rate of the audio
bitDepth :: BitDepthBit depth of the audio data
show/hide Instances
waveReader :: IterateeG L Word8 IO (Maybe WAVEDict)Source
The library function to read the WAVE dictionary
readRiff :: IterateeG L Word8 IO ()Source
Read the RIFF header of a file.
waveChunk :: String -> Maybe WAVE_CHUNKSource
Convert a string to WAVE_CHUNK type
chunkToString :: WAVE_CHUNK -> StringSource
Convert a WAVE_CHUNK to the representative string
dictReadFormat :: Int -> WAVEDict -> IterateeG L Word8 IO (Maybe AudioFormat)Source
Read the specified format chunk from the WAVE dictionary
dictReadFirstFormat :: WAVEDict -> IterateeG L Word8 IO (Maybe AudioFormat)Source
Read the first format chunk in the WAVE dictionary.
dictReadLastFormat :: WAVEDict -> IterateeG L Word8 IO (Maybe AudioFormat)Source
Read the last fromat chunk from the WAVE dictionary. This is useful when parsing all chunks in the dictionary.
dictReadFirstData :: WAVEDict -> IterateeG L Word8 IO (Maybe [Double])Source
Read the first data chunk in the WAVE dictionary.
dictReadLastData :: WAVEDict -> IterateeG L Word8 IO (Maybe [Double])Source
Read the last data chunk in the WAVE dictionary.
dictReadData :: Int -> WAVEDict -> IterateeG L Word8 IO (Maybe [Double])Source
Read the specified data chunk from the WAVE dictionary.
dictProcessData :: Int -> WAVEDict -> IterateeG L Double IO a -> IterateeG L Word8 IO (Maybe a)Source
Read the specified data chunk from the dictionary, applying the data to the specified IterateeG.
Produced by Haddock version 2.6.0