-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | binding to Simple API of pulseaudio -- -- Binding to simple version of client API for the pulseaudio -- soundserver. Although it does not provide advanced features and some -- not-so-adavanced features like volume control, it should be enough for -- simple applications. Tested only on 64-bit linux with ghc-6.10.3. @package pulse-simple @version 0.1.11 -- | Binding to PulseAudio Simple API -- -- example(output 440Hz sine wave for 10 seconds): -- --
--   main=do
--       s<-simpleNew Nothing "example" Play Nothing "this is example application"
--           (SampleSpec (F32 LittleEndian) 44100 1) Nothing Nothing
--       simpleWrite s [sin $ 2*pi*440*(t/44100)|t<-[1..44100*10]]
--       simpleDrain s
--       simpleFree s
--   
module Sound.Pulse.Simple -- | Establish connection to pulseaudio server. You usually don't need to -- specify optional fields. simpleNew :: Maybe String -> String -> Direction -> Maybe String -> String -> SampleSpec -> Maybe [ChannelPosition] -> Maybe BufferAttr -> IO Simple -- | Close the connection. simpleFree :: Simple -> IO () -- | Get current latency in microseconds. simpleGetLatency :: Simple -> IO Integer -- | Read from buffer. simpleRead :: (Storable a) => Simple -> Int -> IO [a] -- | Read raw data from buffer. simpleReadRaw :: Simple -> Int -> IO ByteString -- | Write to buffer. simpleWrite :: (Storable a) => Simple -> [a] -> IO () -- | Write raw data to buffer. simpleWriteRaw :: Simple -> ByteString -> IO () -- | block until buffer is completely consumed simpleDrain :: Simple -> IO () -- | Flush playback buffer simpleFlush :: Simple -> IO () data Simple data SampleSpec -- | format, sampling rate, #channels SampleSpec :: SampleFormat -> Int -> Int -> SampleSpec data SampleFormat U8 :: Compression -> SampleFormat S16 :: Endian -> SampleFormat S24 :: Endian -> SampleFormat -- | 24 bit sample in 32 bit S2432 :: Endian -> SampleFormat S32 :: Endian -> SampleFormat F32 :: Endian -> SampleFormat data Compression Raw :: Compression ALaw :: Compression MuLaw :: Compression data Endian BigEndian :: Endian LittleEndian :: Endian data Direction Play :: Direction Record :: Direction data ChannelPosition ChannelMono :: ChannelPosition ChannelNormal :: ChannelPan -> ChannelPosition ChannelFront :: ChannelPan -> ChannelPosition ChannelRear :: ChannelPan -> ChannelPosition ChannelTopRear :: ChannelPan -> ChannelPosition ChannelTopFront :: ChannelPan -> ChannelPosition -- | low frequency effects ChannelLFE :: ChannelPosition ChannelSubwoofer :: ChannelPosition -- | equivalent to PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER ChannelFrontCenterLeft :: ChannelPosition ChannelFrontCenterRight :: ChannelPosition ChannelSideLeft :: ChannelPosition ChannelSideRight :: ChannelPosition ChannelTopCenter :: ChannelPosition ChannelAux :: Int -> ChannelPosition data ChannelPan PanLeft :: ChannelPan PanRight :: ChannelPan PanCenter :: ChannelPan -- | max length, target length, prebuffer, minimum request, fragment size data BufferAttr BufferAttr :: (Maybe Int) -> (Maybe Int) -> (Maybe Int) -> (Maybe Int) -> (Maybe Int) -> BufferAttr instance Storable BufferAttr instance Enum ChannelPosition instance Storable ChannelMap instance Enum SampleFormat instance Storable SampleSpec instance Enum Direction