module Sound.MikMod.Types where
import Foreign.Ptr
import Foreign.C.Types
import System.IO
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Sound.MikMod.Synonyms
import Sound.MikMod.Flags
newtype Voice = Voice { marshalVoice :: SBYTE }
deriving (Eq, Ord, Show)
data MuteOperation = MuteInclusive | MuteExclusive
deriving (Eq, Show)
data CuriousFlag = Curious | NotCurious
deriving (Eq, Show)
data Pan = Pan Int | PanSurround deriving (Eq, Show)
data MDriver
data MDriverInfo = MDriverInfo
{ mdriverName :: String
, mdriverHardVoiceLimit :: Int
, mdriverSoftVoiceLimit :: Int
, mdriverAlias :: String
} deriving (Show)
data Module
type ModuleHandle = Ptr Module
data ModuleInfo = ModuleInfo
{ moduleSongname :: String
, moduleModType :: String
, moduleComment :: Maybe String
, moduleFlags :: [ModuleFlag]
, moduleNumChannels :: Int
, moduleNumVoices :: Int
, moduleNumPositions :: Int
, moduleNumPatterns :: Int
, moduleNumInstruments :: Int
, moduleNumSamples :: Int
, moduleInstruments :: Maybe [String]
} deriving (Show)
data Sample
type SampleHandle = Ptr Sample
data SampleInfo = SampleInfo
{ samplePanning :: Pan
, sampleSpeed :: Int
, sampleVolume :: Int
, sampleFlags :: [SampleFlag]
, sampleInflags :: [SampleFlag]
, sampleLength :: Int
, sampleLoopStart :: Int
, sampleLoopEnd :: Int
} deriving (Show)
data MReader = MReader
{
readerSeek :: Int -> SeekMode -> IO Outcome
, readerTell :: IO Int
, readerRead :: Int -> IO (Maybe ByteString)
, readerGet :: IO (Maybe Word8)
, readerEof :: IO IsEOF }
data Outcome = Ok | Fail deriving (Eq, Show)
data IsEOF = EOF | NotEOF deriving (Eq, Show)
data Instrument