mikmod-0.2.0.1: MikMod bindings

Safe HaskellSafe
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

Instances

Eq Voice Source # 

Methods

(==) :: Voice -> Voice -> Bool #

(/=) :: Voice -> Voice -> Bool #

Ord Voice Source # 

Methods

compare :: Voice -> Voice -> Ordering #

(<) :: Voice -> Voice -> Bool #

(<=) :: Voice -> Voice -> Bool #

(>) :: Voice -> Voice -> Bool #

(>=) :: Voice -> Voice -> Bool #

max :: Voice -> Voice -> Voice #

min :: Voice -> Voice -> Voice #

Show Voice Source # 

Methods

showsPrec :: Int -> Voice -> ShowS #

show :: Voice -> String #

showList :: [Voice] -> ShowS #

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

Eq Pan Source # 

Methods

(==) :: Pan -> Pan -> Bool #

(/=) :: Pan -> Pan -> Bool #

Show Pan Source # 

Methods

showsPrec :: Int -> Pan -> ShowS #

show :: Pan -> String #

showList :: [Pan] -> ShowS #

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 

data IsEOF Source #

The result of a readerEof call.

Constructors

EOF 
NotEOF 

Instances

Eq IsEOF Source # 

Methods

(==) :: IsEOF -> IsEOF -> Bool #

(/=) :: IsEOF -> IsEOF -> Bool #

Show IsEOF Source # 

Methods

showsPrec :: Int -> IsEOF -> ShowS #

show :: IsEOF -> String #

showList :: [IsEOF] -> ShowS #