pulseaudio-0.0.2.1: A low-level (incomplete) wrapper around the pulseaudio client asynchronous api

Safe HaskellSafe
LanguageHaskell2010

Sound.Pulse.Mainloop.Simple

Description

Maintianer : ongy Stability : experimental

This implementation lacks support for anything but IOInput and IOOutput!.

The main appeal of this is, that it runs in the Haskell RTS system and does not block the RTS in any way. If the doLoop function is called in an forkIO, all functions will "just work", and may be wrapped into a synchronous api wrapper.

If the callback style application flow should be used, this will dispatch all callbacks in the same (Haskell)-thread.

Most function *should* be thread safe (adding multiple events etc.) but there are no checks done for incompatible things happening (modifying and removing the same event).

Synopsis

Documentation

getMainloopImpl :: IO MainloopImpl Source #

Create a new MainloopImpl with initial state

doIteration :: MainloopImpl -> IO () Source #

Do one iteration of events. This may be dispatchin defered events, a timer, an io event, or simply a wakeup. Event callback will be called in the same thread as this!

doLoop :: MainloopImpl -> IO Int Source #

Loop in the pulse main loop until eternety