mikmod-0.2.0.0: MikMod bindings

Safe HaskellNone
LanguageHaskell2010

Sound.MikMod.Types

Synopsis

Documentation

newtype Voice Source

MikMod distinguishes module channels from voices. Sound effects and music both work by playing samples on voices. At most one sample can play on a voice at a time. Operations on the voice level take a voice number which you can get using playerGetChannelVoice and samplePlay.

Constructors

Voice 

Fields

marshalVoice :: SBYTE
 

Instances

data MuteOperation Source

Inclusive or exclusive selection of channels for muting.

data CuriousFlag Source

When loading a module, Curious will cause the loader to attempt to load hidden tracks past the end of the song.

Constructors

Curious 
NotCurious 

data Pan Source

Pan settings.

Constructors

Pan Int 
PanSurround 

Instances

type ModuleHandle = Ptr Module Source

Handle to a Module object which contains the music data and current playback state of a song.

data MReader Source

Collection of IO operations that MikMod can use to load data from an arbitrary source, such as a memory buffer or zip file.

Constructors

MReader 

Fields

readerSeek :: Int -> SeekMode -> IO Outcome

Move the read position. Return Ok for success or Fail for failure.

readerTell :: IO Int

Report the current read position.

readerRead :: Int -> IO (Maybe ByteString)

Return a ByteString of length (at most) n and advance the read position. Return an empty ByteString if already at EOF. Return Nothing in case of an error.

readerGet :: IO (Maybe Word8)

Return one byte and advance the read position. If an error occurs or we are at the end-of-stream, then return Nothing.

readerEof :: IO IsEOF

Return EOF if we are at the end of the stream. Otherwise return NotEOF.

data Outcome Source

Used for the very undescriptive possible outcomes of a readerSeek.

Constructors

Ok 
Fail 

Instances

data IsEOF Source

The result of a readerEof call.

Constructors

EOF 
NotEOF 

Instances