Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data Handle i y
- data Stream
- data Mode
- modes :: [Mode] -> Mode
- nonBlock :: Mode
- async :: Mode
- data Interleaved
- data Noninterleaved
- type Time = Int
- type SampleFreq = Int
- type Size = Int
- class Access i
- class (Storable y, C y) => SampleFmt y
- class SampleFmt y => MonoSampleFmt y
- open :: (Access i, SampleFmt y) => Mode -> Stream -> T i y a -> (a -> T i y b) -> String -> IO (b, Handle i y)
- close :: Handle i y -> IO ()
- prepare :: Handle i y -> IO ()
- start :: Handle i y -> IO ()
- drop :: Handle i y -> IO ()
- drain :: Handle i y -> IO ()
- readi :: SampleFmt y => Handle Interleaved y -> Ptr y -> Size -> IO Size
- writei :: SampleFmt y => Handle Interleaved y -> Ptr y -> Size -> IO Size
- readiRetry :: SampleFmt y => Handle Interleaved y -> Ptr y -> Size -> IO Size
- writeiRetry :: SampleFmt y => Handle Interleaved y -> Ptr y -> Size -> IO Size
- readn :: MonoSampleFmt y => Handle Noninterleaved y -> Ptr (Ptr y) -> Size -> IO Size
- writen :: MonoSampleFmt y => Handle Noninterleaved y -> Ptr (Ptr y) -> Size -> IO Size
Types
Instances
Storable (Handle i y) Source # | |
Defined in Sound.ALSA.PCM.Core.Handle |
data Interleaved Source #
Instances
Access Interleaved Source # | |
Defined in Sound.ALSA.PCM.Core.Class access :: T Interleaved y Access setChannels :: C y => T Interleaved y () |
data Noninterleaved Source #
Instances
Access Noninterleaved Source # | |
Defined in Sound.ALSA.PCM.Core.Class access :: T Noninterleaved y Access setChannels :: C y => T Noninterleaved y () |
type SampleFreq = Int Source #
Classes
access, setChannels
Instances
Access Noninterleaved Source # | |
Defined in Sound.ALSA.PCM.Core.Class access :: T Noninterleaved y Access setChannels :: C y => T Noninterleaved y () | |
Access Interleaved Source # | |
Defined in Sound.ALSA.PCM.Core.Class access :: T Interleaved y Access setChannels :: C y => T Interleaved y () |
class (Storable y, C y) => SampleFmt y Source #
Instances
class SampleFmt y => MonoSampleFmt y Source #
Sample types of this class must have exactly one channel, i.e. Frame.numberOfChannels == 1.
Instances
MonoSampleFmt Double Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Float Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Int8 Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Int16 Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Int32 Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Word8 Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Word16 Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt Word32 Source # | |
Defined in Sound.ALSA.PCM.Core.Class | |
MonoSampleFmt T Source # | |
Defined in Sound.ALSA.PCM.Core.Class |
Management of streams
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.