alsa-0.2: Binding to the ALSA Library API.Source codeContentsIndex
Sound.Alsa.Sequencer.Event
Stabilityprovisional
MaintainerIavor S. Diatchki
Description
This module contains functions for working with events. Reference: http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_event.html
Synopsis
sync_output_queue :: SndSeq -> IO ()
event_input :: SndSeq -> IO Event
event_input_pending :: SndSeq -> Bool -> IO Word
event_output :: SndSeq -> Event -> IO Word
event_output_buffer :: SndSeq -> Event -> IO Word
event_output_direct :: SndSeq -> Event -> IO Word
event_output_pending :: SndSeq -> IO Word
extract_output :: SndSeq -> IO Event
remove_output :: SndSeq -> IO ()
drain_output :: SndSeq -> IO Word
drop_output :: SndSeq -> IO ()
drop_output_buffer :: SndSeq -> IO ()
drop_input :: SndSeq -> IO ()
drop_input_buffer :: SndSeq -> IO ()
Documentation
sync_output_queue :: SndSeq -> IO ()Source
Wait until all events of the client are processed.
event_input :: SndSeq -> IO EventSource

Get an event from the input buffer. If the input buffer is empty, then it is filled with data from the sequencer queue. If there is no data in the sequencer queue, then the process is either put to sleep (if the sequencer is operating in blocking mode), or we throw EAGAIN (if the sequence is operating in non-blocking mode).

We may also throw ENOSPC, which means that the sequencer queue over-run and some events were lost (this clears the input buffer).

event_input_pendingSource
:: SndSeq
-> Boolrefill if empty?
-> IO Wordnumber of events in buffer
Returns the number of events in the input buffer. If the input buffer is empty and the boolean argument is true, then try to fill the input buffer with data from the sequencer queue. See also: snd_seq_event_input.
event_outputSource
:: SndSeq
-> Event
-> IO Wordthe number of remaining events (or bytes?)
Output an event and drain the buffer, if it became full. Throws exceptions. See also: event_output_direct, event_output_buffer, event_output_pending, drain_output, drop_output, extract_output, remove_events
event_output_bufferSource
:: SndSeq
-> Event
-> IO Wordthe byte size of remaining events
Output an event without draining the buffer. Throws -EAGAIN if the buffer becomes full. See also event_output.
event_output_directSource
:: SndSeq
-> Event
-> IO Wordnumber of bytes sent to the sequencer
Output an event directly to the sequencer, NOT through the output buffer. If an error occurs, then we throw an exception. See also event_output.
event_output_pendingSource
:: SndSeq
-> IO Wordsize of pending events (in bytes)
Return the size (in bytes) of pending events on output buffer. See also snd_seq_event_output.
extract_outputSource
:: SndSeq
-> IO Eventthe first event in the buffer (if one was present)
Extract the first event in output buffer. Throws an exception on error. See also snd_seq_event_output.
remove_output :: SndSeq -> IO ()Source
Remove the first event in output buffer. Throws an exception on error. See also snd_seq_event_output.
drain_outputSource
:: SndSeq
-> IO Wordbyte size of events remaining in the buffer.
Drain output buffer to sequencer. This function drains all pending events on the output buffer. The function returns immediately after the events are sent to the queues regardless whether the events are processed or not. To get synchronization with the all event processes, use sync_output_queue after calling this function. Throws an exception on error. See also: event_output, sync_output_queue.
drop_output :: SndSeq -> IO ()Source
Remove events from both the user-space output buffer, and the kernel-space sequencer queue. See also: drain_output, drop_output_buffer, remove_events.
drop_output_buffer :: SndSeq -> IO ()Source
Remove events from the user-space output buffer. See also: drop_output.
drop_input :: SndSeq -> IO ()Source
Remove events from both the user-space input buffer, and the kernel-space sequencer queue. See also: drop_input_buffer, remove_events.
drop_input_buffer :: SndSeq -> IO ()Source
Remove events from the user-space input buffer. See also: drop_input.
Produced by Haddock version 2.4.2