alsa-pcm-0.6.1: Binding to the ALSA Library API (PCM audio).

Safe HaskellSafe
LanguageHaskell2010

Sound.ALSA.PCM.Node.ALSA

Contents

Synopsis

Types

data Handle i y Source #

Instances

Storable (Handle i y) Source # 

Methods

sizeOf :: Handle i y -> Int #

alignment :: Handle i y -> Int #

peekElemOff :: Ptr (Handle i y) -> Int -> IO (Handle i y) #

pokeElemOff :: Ptr (Handle i y) -> Int -> Handle i y -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Handle i y) #

pokeByteOff :: Ptr b -> Int -> Handle i y -> IO () #

peek :: Ptr (Handle i y) -> IO (Handle i y) #

poke :: Ptr (Handle i y) -> Handle i y -> IO () #

data Mode Source #

Instances

data Interleaved Source #

Instances

type Time = Int Source #

type Size = Int Source #

Classes

class Access i Source #

Minimal complete definition

access, setChannels

Instances

class SampleFmt y => MonoSampleFmt y Source #

Sample types of this class must have exactly one channel, i.e. Frame.numberOfChannels == 1.

Management of streams

open Source #

Arguments

:: (Access i, SampleFmt y) 
=> Mode 
-> Stream 
-> T i y a 
-> (a -> T i y b) 
-> String

device, e.g "default"

-> IO (b, Handle i y) 

close :: Handle i y -> IO () Source #

prepare :: Handle i y -> IO () Source #

start :: Handle i y -> IO () Source #

drop :: Handle i y -> IO () Source #

drain :: Handle i y -> IO () Source #

Data transfer

readiRetry :: SampleFmt y => Handle Interleaved y -> Ptr y -> Size -> IO Size Source #

retry on buffer over-run

writeiRetry :: SampleFmt y => Handle Interleaved y -> Ptr y -> Size -> IO Size Source #

retry on buffer under-run

readn :: MonoSampleFmt y => Handle Noninterleaved y -> Ptr (Ptr y) -> Size -> IO Size Source #

The Ptr (Ptr y) argument is actually a pointer to an array of pointers. The array must have the size of number of channels. In Noninterleaved mode you must set the number of channels manually using setChannels or its friends. It is an unchecked error if the number of channels set with setChannels does not match the array size in the readn call.