sfml-audio-0.4.0.1816: minimal bindings to the audio module of sfml

Safe HaskellSafe-Infered

Sound.SFML

Contents

Synopsis

PolySounds

data PolySound Source

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.)

Instances

newPolySoundSource

Arguments

:: FilePath

soundfile

-> Int

number of internal sound instances.

-> IO PolySound 

Loads a sound into memory.

freePolySound :: PolySound -> IO ()Source

Frees the memory allocated by a sound. Don't use the PolySound afterwards.

triggerPolySound :: PolySound -> Maybe Float -> IO ()Source

Trigger a sound

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.