Safe Haskell | Safe-Infered |
---|
Sound.SFML
Contents
- data PolySound
- newPolySound :: FilePath -> Int -> IO PolySound
- freePolySound :: PolySound -> IO ()
- triggerPolySound :: PolySound -> Maybe Float -> IO ()
- data LoopedSound
- newLoopedSound :: FilePath -> IO LoopedSound
- freeLoopedSound :: LoopedSound -> IO ()
- startLoopedSound :: LoopedSound -> IO ()
- stopLoopedSound :: LoopedSound -> IO ()
PolySounds
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.)
Loads a sound into memory.
freePolySound :: PolySound -> IO ()Source
Frees the memory allocated by a sound. Don't use the PolySound afterwards.
LoopedSounds
data LoopedSound Source
LoopedSounds are sounds that will always loop. They can just be switched on and off.
Instances
newLoopedSound :: FilePath -> IO LoopedSoundSource
Loads a sound into memory.
freeLoopedSound :: LoopedSound -> IO ()Source
Releases the allocated memory of a LoopedSound. Don't use the LoopedSound afterwards.
startLoopedSound :: LoopedSound -> IO ()Source
Starts a looped sound.
stopLoopedSound :: LoopedSound -> IO ()Source
Stops a looped sound.