flaw-audio-0.1.0.0

LicenseMIT
Safe HaskellSafe
LanguageHaskell2010

Flaw.Audio

Description

 
Synopsis

Documentation

class Device d where Source #

Associated Types

data SoundId d :: * Source #

Sound type.

data SoundPlayerId d :: * Source #

Type of sound player.

Methods

createSound :: d -> SoundFormat -> ByteString -> IO (SoundId d, IO ()) Source #

Create buffered sound.

createStreamingSound :: d -> IO ((SoundFormat, ByteStream), IO ()) -> IO (SoundId d, IO ()) Source #

Create streaming sound. Streaming sound player pulls sound data from bounded queue.

createSoundPlayer :: SoundId d -> IO (SoundPlayerId d, IO ()) Source #

Create player for a sound.

tickAudio :: d -> IO () Source #

Apply deferred updates to all sound objects simultaneously.

playSound :: SoundPlayerId d -> STM () Source #

Start playing.

playLoopSound :: SoundPlayerId d -> STM () Source #

Start playing a loop.

pauseSound :: SoundPlayerId d -> STM () Source #

Pause playing.

stopSound :: SoundPlayerId d -> STM () Source #

Stop playing.

setSoundPosition :: SoundPlayerId d -> Float3 -> STM () Source #

Set position of sound player.

setSoundDirection :: SoundPlayerId d -> Float3 -> STM () Source #

Set direction of sound player.

setSoundVelocity :: SoundPlayerId d -> Float3 -> STM () Source #

Set velocity of sound player.

soundSampleSize :: SoundSampleType -> Int Source #

Size of a single sample.