Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class (Storable y, C y) => SampleFmt y where
- type SampleFreq = Int
- type Time = Int
- type Size = Int
- data SoundFmt y = SoundFmt {}
- data SoundSource handle y = SoundSource {
- soundSourceOpen :: IO (handle y)
- soundSourceClose :: handle y -> IO ()
- soundSourceStart :: handle y -> IO ()
- soundSourceStop :: handle y -> IO ()
- soundSourceRead :: handle y -> Ptr y -> Size -> IO Size
- data SoundSink handle y = SoundSink {
- soundSinkOpen :: IO (handle y)
- soundSinkClose :: handle y -> IO ()
- soundSinkWrite :: handle y -> Ptr y -> Size -> IO ()
- soundSinkStart :: handle y -> IO ()
- soundSinkStop :: handle y -> IO ()
- data SoundBufferTime = SoundBufferTime {
- bufferTime, periodTime :: Time
- type Pcm = Handle Interleaved
- 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
- soundFmtMIME :: SampleFmt y => SoundFmt y -> String
- audioBytesPerSample :: SampleFmt y => SoundFmt y -> Int
- audioBytesPerFrame :: SampleFmt y => SoundFmt y -> Int
- soundSourceBytesPerFrame :: SampleFmt y => SoundSource handle y -> Int
- soundSinkBytesPerFrame :: SampleFmt y => SoundSink handle y -> Int
- copySound :: SampleFmt y => SoundSource handleIn y -> SoundSink handleOut y -> Size -> IO ()
- alsaSoundSource :: SampleFmt y => String -> SoundFmt y -> SoundSource Pcm y
- alsaSoundSink :: SampleFmt y => String -> SoundFmt y -> SoundSink Pcm y
- alsaSoundSourceTime :: SampleFmt y => String -> SoundFmt y -> SoundBufferTime -> SoundSource Pcm y
- alsaSoundSinkTime :: SampleFmt y => String -> SoundFmt y -> SoundBufferTime -> SoundSink Pcm y
- alsaSoundSourceParams :: SampleFmt y => String -> T Interleaved y a -> (a -> T Interleaved y ()) -> SoundSource Pcm y
- alsaSoundSinkParams :: SampleFmt y => String -> T Interleaved y a -> (a -> T Interleaved y ()) -> SoundSink Pcm y
- fileSoundSource :: SampleFmt y => FilePath -> SoundSource File y
- fileSoundSink :: SampleFmt y => FilePath -> SoundSink File y
Documentation
class (Storable y, C y) => SampleFmt y where Source #
sampleFmtToPcmFormat :: y -> Format Source #
Instances
type SampleFreq = Int Source #
data SoundSource handle y Source #
Counts are in samples, not bytes. Multi-channel data is interleaved.
SoundSource | |
|
data SoundSink handle y Source #
SoundSink | |
|
data SoundBufferTime Source #
Instances
Show SoundBufferTime Source # | |
Defined in Sound.ALSA.PCM showsPrec :: Int -> SoundBufferTime -> ShowS # show :: SoundBufferTime -> String # showList :: [SoundBufferTime] -> ShowS # |
type Pcm = Handle Interleaved Source #
withSoundSource :: SoundSource handle y -> (handle y -> IO a) -> IO a Source #
withSoundSourceRunning :: SoundSource handle y -> handle y -> IO a -> IO a Source #
soundSourceBytesPerFrame :: SampleFmt y => SoundSource handle y -> Int Source #
:: SampleFmt y | |
=> SoundSource handleIn y | |
-> SoundSink handleOut y | |
-> Size | Buffer size (in sample frames) to use |
-> IO () |
alsaSoundSource :: SampleFmt y => String -> SoundFmt y -> SoundSource Pcm y Source #
alsaSoundSourceTime :: SampleFmt y => String -> SoundFmt y -> SoundBufferTime -> SoundSource Pcm y Source #
alsaSoundSinkTime :: SampleFmt y => String -> SoundFmt y -> SoundBufferTime -> SoundSink Pcm y Source #
alsaSoundSourceParams :: SampleFmt y => String -> T Interleaved y a -> (a -> T Interleaved y ()) -> SoundSource Pcm y Source #
alsaSoundSinkParams :: SampleFmt y => String -> T Interleaved y a -> (a -> T Interleaved y ()) -> SoundSink Pcm y Source #
fileSoundSource :: SampleFmt y => FilePath -> SoundSource File y Source #