-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | minimal bindings to the audio module of sfml
--   
--   Provides a very minimal interface to the audio module of sfml.
--   Currently, only the playing of sounds is covered. Playing background
--   music is not yet supported, but planned. (sfml is a multimedia
--   library: <a>http://www.sfml-dev.org/</a>)
@package sfml-audio
@version 0.7.0.1816

module Sound.SFML.LowLevel
toStatus :: Int -> Status
data Status
Stopped :: Status
Paused :: Status
Playing :: Status
data SoundBuffer
sfSoundBuffer_CreateFromFile :: FilePath -> IO (Ptr SoundBuffer)
c__sfSoundBuffer_CreateFromFile :: CString -> IO (Ptr SoundBuffer)
sfSoundBuffer_Destroy :: Ptr SoundBuffer -> IO ()
data Sound
sfSound_Create :: IO (Ptr Sound)
sfSound_SetBuffer :: Ptr Sound -> Ptr SoundBuffer -> IO ()
sfSound_Play :: Ptr Sound -> IO ()
sfSound_Stop :: Ptr Sound -> IO ()
sfSound_Destroy :: Ptr Sound -> IO ()
sfSound_SetLoop :: Ptr Sound -> Bool -> IO ()
sfSound_SetVolume :: Ptr Sound -> Float -> IO ()
sfSound_GetStatus :: Ptr Sound -> IO Int
getSoundStatus :: Ptr Sound -> IO Status
data Music
sfMusic_CreateFromFile :: FilePath -> IO (Ptr Music)
c__sfMusic_CreateFromFile :: CString -> IO (Ptr Music)
sfMusic_Destroy :: Ptr Music -> IO ()
sfMusic_Play :: Ptr Music -> IO ()
sfMusic_Stop :: Ptr Music -> IO ()
sfMusic_Pause :: Ptr Music -> IO ()
sfMusic_SetLoop :: Ptr Music -> Bool -> IO ()
sfMusic_SetVolume :: Ptr Music -> Float -> IO ()
sfMusic_GetDuration :: Ptr Music -> IO Float
sfMusic_GetStatus :: Ptr Music -> IO Int
getMusicStatus :: Ptr Music -> IO Status
instance Eq Status
instance Enum Status
instance Show Status

module Sound.SFML

-- | A PolySound allows you to trigger one sound multiple times. The played
--   sounds will then overlap. (Internally, there will be multiple sound
--   instances, that will be triggered one after the other. If there are
--   not enough internal instances, sounds will be cut.)
data PolySound

-- | Loads a sound into memory.
newPolySound :: FilePath -> Int -> IO PolySound

-- | Frees the memory allocated by a sound. Don't use the PolySound
--   afterwards.
freePolySound :: PolySound -> IO ()

-- | Trigger a sound
triggerPolySound :: PolySound -> Maybe Float -> IO ()

-- | LoopedSounds are sounds that will always loop. They can just be
--   switched on and off.
data LoopedSound

-- | Loads a sound into memory.
newLoopedSound :: FilePath -> IO LoopedSound

-- | Releases the allocated memory of a LoopedSound. Don't use the
--   LoopedSound afterwards.
freeLoopedSound :: LoopedSound -> IO ()

-- | Starts a looped sound.
startLoopedSound :: Maybe Float -> LoopedSound -> IO ()

-- | Stops a looped sound.
stopLoopedSound :: LoopedSound -> IO ()

-- | Loads and plays a music file once in a background thread. Stops other
--   music that is playing. If the current music is Paused and the given
--   file is the same as the one playing, the music is continued. The
--   volume is set again in any case.
playMusic :: FilePath -> Maybe Float -> IO ()

-- | Like <a>playMusic</a>, but looping.
playMusicLooped :: FilePath -> Maybe Float -> IO ()

-- | Stops any background music that is playing.
stopMusic :: IO ()

-- | Pauses the current music.
pauseMusic :: IO ()
instance Show LoopedSound
instance Show PolySound
