{-# LANGUAGE TemplateHaskell #-} module Sound.Data where import qualified SDL.Mixer as Mix import qualified Data.IntMap.Strict as IM import qualified Data.Map.Strict as M import Control.Lens --import Geometry import Data.Word (Word8) import Data.Int (Int16) data SoundStatus = Playing | FadingOut | ToStart deriving (Eq,Ord,Show) data SoundData a = SoundData {_loadedChunks :: IM.IntMap Mix.Chunk ,_playingSounds :: M.Map a Sound } data Sound = Sound { _soundTime :: Maybe Int , _soundFadeTime :: Int , _soundStatus :: SoundStatus , _soundChannel :: Maybe Mix.Channel , _soundPos :: Maybe (Int16,Word8) , _soundChunkID :: Int } deriving (Eq,Ord,Show) makeLenses ''SoundData makeLenses ''Sound