iteratee-0.1.0: Iteratee-based I/O

Data.Iteratee.Codecs.Wave

Synopsis

Documentation

data WAVEDE Source

Constructors

WAVEDE 

Fields

wavede_count :: Int

length of chunk

wavede_type :: WAVE_CHUNK

type of chunk

wavede_enum :: WAVEDE_ENUM

enumerator 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_FMT

Format

WAVE_DATA

Data

WAVE_OTHER String

Other

data AudioFormat Source

Constructors

AudioFormat 

Fields

numberOfChannels :: NumChannels

Number of channels in the audio data

sampleRate :: SampleRate

Sample rate of the audio

bitDepth :: BitDepth

Bit depth of the audio data

wave_reader :: IterateeGM L Word8 IO (Maybe WAVEDict)Source

The library function to read the WAVE dictionary

read_riff :: IterateeGM L Word8 IO ()Source

Read the RIFF header of a file.

wave_chunk :: String -> Maybe WAVE_CHUNKSource

Convert a string to WAVE_CHUNK type

chunk_to_string :: WAVE_CHUNK -> StringSource

Convert a WAVE_CHUNK to the representative string

dict_read_format :: Int -> WAVEDict -> IterateeGM L Word8 IO (Maybe AudioFormat)Source

Read the specified format chunk from the WAVE dictionary

dict_read_first_format :: WAVEDict -> IterateeGM L Word8 IO (Maybe AudioFormat)Source

Read the first format chunk in the WAVE dictionary.

dict_read_last_format :: WAVEDict -> IterateeGM 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.

dict_read_first_data :: WAVEDict -> IterateeGM L Word8 IO (Maybe [Double])Source

Read the first data chunk in the WAVE dictionary.

dict_read_last_data :: WAVEDict -> IterateeGM L Word8 IO (Maybe [Double])Source

Read the last data chunk in the WAVE dictionary.

dict_read_data :: Int -> WAVEDict -> IterateeGM L Word8 IO (Maybe [Double])Source

Read the specified data chunk from the WAVE dictionary.

dict_process_data :: Int -> WAVEDict -> IterateeGM L Double IO a -> IterateeGM L Word8 IO (Maybe a)Source

Read the specified data chunk from the dictionary, applying the data to the specified IterateeGM.