Safe Haskell | None |
---|---|

Language | Haskell2010 |

Resampling buffers from asynchronous Mealy machines.
These are used in many other modules implementing `ResamplingBuffer`

s.

## Synopsis

- data AsyncMealy m s a b = AsyncMealy {}
- timelessResamplingBuffer :: Monad m => AsyncMealy m s a b -> s -> ResamplingBuffer m cl1 cl2 a b
- trivialResamplingBuffer :: Monad m => ResamplingBuffer m cl1 cl2 () ()

# Documentation

data AsyncMealy m s a b Source #

An asynchronous, effectful Mealy machine description.
(Input and output do not happen simultaneously.)
It can be used to create `ResamplingBuffer`

s.

timelessResamplingBuffer Source #

:: Monad m | |

=> AsyncMealy m s a b | |

-> s | The initial state |

-> ResamplingBuffer m cl1 cl2 a b |

A resampling buffer that is unaware of the time information of the clock,
and thus clock-polymorphic.
It is built from an asynchronous Mealy machine description.
Whenever `get`

is called on `timelessResamplingBuffer machine s`

,
the method `amGet`

is called on `machine`

with state `s`

,
discarding the time stamp. Analogously for `put`

.

trivialResamplingBuffer :: Monad m => ResamplingBuffer m cl1 cl2 () () Source #

A resampling buffer that only accepts and emits units.