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

Safe HaskellSafe
LanguageHaskell2010

Sound.ALSA.PCM

Synopsis

Documentation

class (Storable y, C y) => SampleFmt y where #

Minimal complete definition

sampleFmtToPcmFormat

Methods

sampleFmtToPcmFormat :: y -> Format #

Instances

SampleFmt Double # 

Methods

sampleFmtToPcmFormat :: Double -> Format #

SampleFmt Float # 

Methods

sampleFmtToPcmFormat :: Float -> Format #

SampleFmt Int8 # 

Methods

sampleFmtToPcmFormat :: Int8 -> Format #

SampleFmt Int16 # 

Methods

sampleFmtToPcmFormat :: Int16 -> Format #

SampleFmt Int32 # 

Methods

sampleFmtToPcmFormat :: Int32 -> Format #

SampleFmt Word8 # 

Methods

sampleFmtToPcmFormat :: Word8 -> Format #

SampleFmt Word16 # 

Methods

sampleFmtToPcmFormat :: Word16 -> Format #

SampleFmt Word32 # 

Methods

sampleFmtToPcmFormat :: Word32 -> Format #

SampleFmt T # 

Methods

sampleFmtToPcmFormat :: T -> Format #

SampleFmt a => SampleFmt (T a) # 

Methods

sampleFmtToPcmFormat :: T a -> Format #

type Time = Int #

type Size = Int #

data SoundFmt y #

Constructors

SoundFmt 

Instances

Show (SoundFmt y) # 

Methods

showsPrec :: Int -> SoundFmt y -> ShowS #

show :: SoundFmt y -> String #

showList :: [SoundFmt y] -> ShowS #

data SoundSource handle y #

Counts are in samples, not bytes. Multi-channel data is interleaved.

Constructors

SoundSource 

Fields

data SoundSink handle y #

Constructors

SoundSink 

Fields

type File = Handle #

withSoundSource :: SoundSource handle y -> (handle y -> IO a) -> IO a #

withSoundSourceRunning :: SoundSource handle y -> handle y -> IO a -> IO a #

withSoundSink :: SoundSink handle y -> (handle y -> IO a) -> IO a #

withSoundSinkRunning :: SoundSink handle y -> handle y -> IO a -> IO a #

copySound #

Arguments

:: SampleFmt y 
=> SoundSource handleIn y 
-> SoundSink handleOut y 
-> Size

Buffer size (in sample frames) to use

-> IO ()