Safe Haskell | None |
---|
- class (Storable y, C y) => SampleFmt y where
- sampleFmtToPcmFormat :: y -> Format
- 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 :: Time
- 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
type SampleFreq = IntSource
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
type Pcm = Handle InterleavedSource
withSoundSource :: SoundSource handle y -> (handle y -> IO a) -> IO aSource
withSoundSourceRunning :: SoundSource handle y -> handle y -> IO a -> IO aSource
withSoundSink :: SoundSink handle y -> (handle y -> IO a) -> IO aSource
withSoundSinkRunning :: SoundSink handle y -> handle y -> IO a -> IO aSource
soundFmtMIME :: SampleFmt y => SoundFmt y -> StringSource
audioBytesPerSample :: SampleFmt y => SoundFmt y -> IntSource
audioBytesPerFrame :: SampleFmt y => SoundFmt y -> IntSource
soundSourceBytesPerFrame :: SampleFmt y => SoundSource handle y -> IntSource
soundSinkBytesPerFrame :: SampleFmt y => SoundSink handle y -> IntSource
:: 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 ySource
alsaSoundSourceTime :: SampleFmt y => String -> SoundFmt y -> SoundBufferTime -> SoundSource Pcm ySource
alsaSoundSinkTime :: SampleFmt y => String -> SoundFmt y -> SoundBufferTime -> SoundSink Pcm ySource
alsaSoundSourceParams :: SampleFmt y => String -> T Interleaved y a -> (a -> T Interleaved y ()) -> SoundSource Pcm ySource
alsaSoundSinkParams :: SampleFmt y => String -> T Interleaved y a -> (a -> T Interleaved y ()) -> SoundSink Pcm ySource
fileSoundSource :: SampleFmt y => FilePath -> SoundSource File ySource